Skip to content

Commit

Permalink
[DOC release] Boolean attributeBindings documentation updated
Browse files Browse the repository at this point in the history
From [HTML5, A vocabulary and associated APIs for HTML and
XHTML](https://www.w3.org/TR/html5/infrastructure.html#boolean-attributes):

    A number of attributes are boolean attributes. The presence of a boolean
attribute on an element represents the true value, and the absence of the
attribute represents the false value.

    **Note:** The values "true" and "false" are not allowed on boolean
attributes. To represent a false value, the attribute has to be omitted
altogether.

Fixes emberjs#14024
  • Loading branch information
Serabe authored and webark committed Oct 6, 2016
1 parent f61dd38 commit 087c526
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ember-views/lib/views/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ import ViewMixin from 'ember-views/mixins/view_support';
```
If the return value of an `attributeBindings` monitored property is a boolean
the property's value will be set as a coerced string:
the attribute will be present or absent depending on the value:
```javascript
MyTextInput = Ember.View.extend({
Expand All @@ -268,7 +268,7 @@ import ViewMixin from 'ember-views/mixins/view_support';
Will result in a view instance with an HTML representation of:
```html
<input id="ember1" class="ember-view" disabled="false" />
<input id="ember1" class="ember-view" />
```
`attributeBindings` can refer to computed properties:
Expand Down

0 comments on commit 087c526

Please sign in to comment.