From 087c526f777742caf792ecb02dfb67f8476b8904 Mon Sep 17 00:00:00 2001 From: Sergio Arbeo Date: Sat, 6 Aug 2016 20:37:43 +0200 Subject: [PATCH] [DOC release] Boolean `attributeBindings` documentation updated 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 #14024 --- packages/ember-views/lib/views/view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ember-views/lib/views/view.js b/packages/ember-views/lib/views/view.js index b35339afff4..81c7aff3f21 100644 --- a/packages/ember-views/lib/views/view.js +++ b/packages/ember-views/lib/views/view.js @@ -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({ @@ -268,7 +268,7 @@ import ViewMixin from 'ember-views/mixins/view_support'; Will result in a view instance with an HTML representation of: ```html - + ``` `attributeBindings` can refer to computed properties: