react 0.8.0 → 0.9.0-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +0 -8
  2. package/addons.js +0 -3
  3. package/lib/AutoFocusMixin.js +30 -0
  4. package/lib/CSSCore.js +22 -21
  5. package/lib/CSSProperty.js +31 -0
  6. package/lib/ChangeEventPlugin.js +26 -4
  7. package/lib/ClientReactRootIndex.js +30 -0
  8. package/lib/CompositionEventPlugin.js +57 -9
  9. package/lib/DOMChildrenOperations.js +32 -2
  10. package/lib/DOMProperty.js +2 -0
  11. package/lib/DOMPropertyOperations.js +14 -1
  12. package/lib/Danger.js +8 -7
  13. package/lib/DefaultDOMPropertyConfig.js +12 -2
  14. package/lib/EnterLeaveEventPlugin.js +37 -4
  15. package/lib/EventConstants.js +3 -0
  16. package/lib/EventListener.js +42 -34
  17. package/lib/EventPluginHub.js +113 -12
  18. package/lib/EventPluginRegistry.js +39 -16
  19. package/lib/EventPluginUtils.js +32 -3
  20. package/lib/EventPropagators.js +6 -42
  21. package/lib/ExecutionEnvironment.js +3 -0
  22. package/lib/LinkedValueUtils.js +161 -0
  23. package/lib/PooledClass.js +6 -0
  24. package/lib/React.js +27 -3
  25. package/lib/ReactCSSTransitionGroup.js +65 -0
  26. package/lib/{ReactTransitionableChild.js → ReactCSSTransitionGroupChild.js} +21 -35
  27. package/lib/ReactComponent.js +87 -52
  28. package/lib/ReactComponentBrowserEnvironment.js +67 -49
  29. package/lib/ReactComponentEnvironment.js +2 -0
  30. package/lib/ReactCompositeComponent.js +547 -112
  31. package/lib/ReactContext.js +67 -0
  32. package/lib/ReactDOM.js +13 -0
  33. package/lib/ReactDOMButton.js +4 -0
  34. package/lib/ReactDOMComponent.js +46 -21
  35. package/lib/ReactDOMForm.js +9 -2
  36. package/lib/ReactDOMIDOperations.js +105 -60
  37. package/lib/ReactDOMImg.js +58 -0
  38. package/lib/ReactDOMInput.js +26 -14
  39. package/lib/ReactDOMOption.js +1 -0
  40. package/lib/ReactDOMSelect.js +36 -17
  41. package/lib/ReactDOMTextarea.js +12 -8
  42. package/lib/ReactDefaultInjection.js +50 -26
  43. package/lib/ReactDefaultPerf.js +207 -370
  44. package/lib/ReactDefaultPerfAnalysis.js +199 -0
  45. package/lib/ReactErrorUtils.js +5 -14
  46. package/lib/ReactEventEmitter.js +141 -145
  47. package/lib/ReactEventEmitterMixin.js +0 -32
  48. package/lib/ReactEventTopLevelCallback.js +32 -12
  49. package/lib/ReactInjection.js +39 -0
  50. package/lib/ReactInstanceHandles.js +35 -19
  51. package/lib/ReactLink.js +1 -1
  52. package/lib/ReactMount.js +127 -103
  53. package/lib/ReactMountReady.js +1 -1
  54. package/lib/ReactMultiChild.js +30 -46
  55. package/lib/ReactMultiChildUpdateTypes.js +2 -0
  56. package/lib/ReactOwner.js +10 -2
  57. package/lib/ReactPerf.js +5 -8
  58. package/lib/ReactPropTransferer.js +40 -21
  59. package/lib/ReactPropTypeLocationNames.js +31 -0
  60. package/lib/ReactPropTypeLocations.js +29 -0
  61. package/lib/ReactPropTypes.js +248 -47
  62. package/lib/ReactPutListenerQueue.js +61 -0
  63. package/lib/ReactReconcileTransaction.js +20 -0
  64. package/lib/ReactRootIndex.js +36 -0
  65. package/lib/ReactServerRendering.js +8 -11
  66. package/lib/ReactTextComponent.js +8 -3
  67. package/lib/{ReactTransitionKeySet.js → ReactTransitionChildMapping.js} +42 -47
  68. package/lib/ReactTransitionGroup.js +132 -57
  69. package/lib/ReactUpdates.js +14 -11
  70. package/lib/ReactWithAddons.js +7 -2
  71. package/lib/SelectEventPlugin.js +22 -39
  72. package/lib/ServerReactRootIndex.js +36 -0
  73. package/lib/SimpleEventPlugin.js +54 -6
  74. package/lib/SyntheticClipboardEvent.js +7 -1
  75. package/lib/SyntheticDragEvent.js +44 -0
  76. package/lib/SyntheticEvent.js +2 -1
  77. package/lib/SyntheticKeyboardEvent.js +4 -2
  78. package/lib/SyntheticWheelEvent.js +10 -7
  79. package/lib/Transaction.js +61 -36
  80. package/lib/cloneWithProps.js +59 -0
  81. package/lib/createArrayFrom.js +10 -13
  82. package/lib/createFullPageComponent.js +63 -0
  83. package/lib/cx.js +2 -2
  84. package/lib/flattenChildren.js +5 -2
  85. package/lib/getActiveElement.js +4 -3
  86. package/lib/getEventKey.js +85 -0
  87. package/lib/getMarkupWrap.js +10 -0
  88. package/lib/getTextContentAccessor.js +5 -3
  89. package/lib/getUnboundedScrollPosition.js +2 -2
  90. package/lib/invariant.js +12 -4
  91. package/lib/isEventSupported.js +7 -11
  92. package/lib/mergeHelpers.js +5 -6
  93. package/lib/onlyChild.js +43 -0
  94. package/lib/shouldUpdateReactComponent.js +58 -0
  95. package/lib/toArray.js +75 -0
  96. package/lib/traverseAllChildren.js +69 -7
  97. package/lib/warning.js +40 -0
  98. package/package.json +2 -3
  99. package/react.js +0 -3
  100. package/ReactJSErrors.js +0 -40
  101. package/lib/$.js +0 -46
  102. package/lib/CallbackRegistry.js +0 -91
  103. package/lib/LinkedValueMixin.js +0 -68
  104. package/lib/ex.js +0 -49
  105. package/lib/filterAttributes.js +0 -45
  106. package/lib/ge.js +0 -76
  107. package/lib/mutateHTMLNodeWithMarkup.js +0 -100
package/README.md CHANGED
@@ -5,18 +5,10 @@ without also requiring the JSX transformer. This is especially useful for cases
5
5
  want to [`browserify`](https://github.com/substack/node-browserify) your module using
6
6
  `React`.
7
7
 
8
- ## The `react` npm package has recently changed!
9
-
10
- If you're looking for jeffbski's [React.js](https://github.com/jeffbski/react) project, it's now in `npm` as `autoflow` rather than `react`.
11
8
 
12
9
  ## Example Usage
13
10
 
14
11
  ```js
15
-
16
- // Previously, you might access React with react-tools.
17
- var React = require('react-tools').React;
18
-
19
- // Now you can access React directly with react-core.
20
12
  var React = require('react');
21
13
 
22
14
  // You can also access ReactWithAddons.
package/addons.js CHANGED
@@ -1,4 +1 @@
1
1
  module.exports = require('./lib/ReactWithAddons');
2
- if ('production' !== process.env.NODE_ENV) {
3
- module.exports = require('./ReactJSErrors').wrap(module.exports);
4
- }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright 2013 Facebook, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * @providesModule AutoFocusMixin
17
+ * @typechecks static-only
18
+ */
19
+
20
+ "use strict";
21
+
22
+ var AutoFocusMixin = {
23
+ componentDidMount: function() {
24
+ if (this.props.autoFocus) {
25
+ this.getDOMNode().focus();
26
+ }
27
+ }
28
+ };
29
+
30
+ module.exports = AutoFocusMixin;
package/lib/CSSCore.js CHANGED
@@ -22,29 +22,11 @@ var invariant = require("./invariant");
22
22
  /**
23
23
  * The CSSCore module specifies the API (and implements most of the methods)
24
24
  * that should be used when dealing with the display of elements (via their
25
- * CSS classes and visibility on screeni. It is an API focused on mutating the
25
+ * CSS classes and visibility on screen. It is an API focused on mutating the
26
26
  * display and not reading it as no logical state should be encoded in the
27
27
  * display of elements.
28
28
  */
29
29
 
30
- /**
31
- * Tests whether the element has the class specified.
32
- *
33
- * Note: This function is not exported in CSSCore because CSS classNames should
34
- * not store any logical information about the element. Use DataStore to store
35
- * information on an element.
36
- *
37
- * @param {DOMElement} element the element to set the class on
38
- * @param {string} className the CSS className
39
- * @returns {boolean} true if the element has the class, false if not
40
- */
41
- function hasClass(element, className) {
42
- if (element.classList) {
43
- return !!className && element.classList.contains(className);
44
- }
45
- return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1;
46
- }
47
-
48
30
  var CSSCore = {
49
31
 
50
32
  /**
@@ -64,7 +46,7 @@ var CSSCore = {
64
46
  if (className) {
65
47
  if (element.classList) {
66
48
  element.classList.add(className);
67
- } else if (!hasClass(element, className)) {
49
+ } else if (!CSSCore.hasClass(element, className)) {
68
50
  element.className = element.className + ' ' + className;
69
51
  }
70
52
  }
@@ -88,7 +70,7 @@ var CSSCore = {
88
70
  if (className) {
89
71
  if (element.classList) {
90
72
  element.classList.remove(className);
91
- } else if (hasClass(element, className)) {
73
+ } else if (CSSCore.hasClass(element, className)) {
92
74
  element.className = element.className
93
75
  .replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1')
94
76
  .replace(/\s+/g, ' ') // multiple spaces to one
@@ -108,7 +90,26 @@ var CSSCore = {
108
90
  */
109
91
  conditionClass: function(element, className, bool) {
110
92
  return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className);
93
+ },
94
+
95
+ /**
96
+ * Tests whether the element has the class specified.
97
+ *
98
+ * @param {DOMNode|DOMWindow} element the element to set the class on
99
+ * @param {string} className the CSS className
100
+ * @returns {boolean} true if the element has the class, false if not
101
+ */
102
+ hasClass: function(element, className) {
103
+ ("production" !== process.env.NODE_ENV ? invariant(
104
+ !/\s/.test(className),
105
+ 'CSS.hasClass takes only a single class name.'
106
+ ) : invariant(!/\s/.test(className)));
107
+ if (element.classList) {
108
+ return !!className && element.classList.contains(className);
109
+ }
110
+ return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1;
111
111
  }
112
+
112
113
  };
113
114
 
114
115
  module.exports = CSSCore;
@@ -22,15 +22,46 @@
22
22
  * CSS properties which accept numbers but are not in units of "px".
23
23
  */
24
24
  var isUnitlessNumber = {
25
+ columnCount: true,
25
26
  fillOpacity: true,
27
+ flex: true,
28
+ flexGrow: true,
29
+ flexShrink: true,
26
30
  fontWeight: true,
31
+ lineClamp: true,
27
32
  lineHeight: true,
28
33
  opacity: true,
34
+ order: true,
29
35
  orphans: true,
36
+ widows: true,
30
37
  zIndex: true,
31
38
  zoom: true
32
39
  };
33
40
 
41
+ /**
42
+ * @param {string} prefix vendor-specific prefix, eg: Webkit
43
+ * @param {string} key style name, eg: transitionDuration
44
+ * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
45
+ * WebkitTransitionDuration
46
+ */
47
+ function prefixKey(prefix, key) {
48
+ return prefix + key.charAt(0).toUpperCase() + key.substring(1);
49
+ }
50
+
51
+ /**
52
+ * Support style names that may come passed in prefixed by adding permutations
53
+ * of vendor prefixes.
54
+ */
55
+ var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
56
+
57
+ // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
58
+ // infinite loop, because it iterates over the newly added props too.
59
+ Object.keys(isUnitlessNumber).forEach(function(prop) {
60
+ prefixes.forEach(function(prefix) {
61
+ isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
62
+ });
63
+ });
64
+
34
65
  /**
35
66
  * Most style properties can be unset by doing .style[prop] = '' but IE8
36
67
  * doesn't like doing that with shorthand properties so for the properties that
@@ -22,6 +22,7 @@ var EventConstants = require("./EventConstants");
22
22
  var EventPluginHub = require("./EventPluginHub");
23
23
  var EventPropagators = require("./EventPropagators");
24
24
  var ExecutionEnvironment = require("./ExecutionEnvironment");
25
+ var ReactUpdates = require("./ReactUpdates");
25
26
  var SyntheticEvent = require("./SyntheticEvent");
26
27
 
27
28
  var isEventSupported = require("./isEventSupported");
@@ -35,7 +36,17 @@ var eventTypes = {
35
36
  phasedRegistrationNames: {
36
37
  bubbled: keyOf({onChange: null}),
37
38
  captured: keyOf({onChangeCapture: null})
38
- }
39
+ },
40
+ dependencies: [
41
+ topLevelTypes.topBlur,
42
+ topLevelTypes.topChange,
43
+ topLevelTypes.topClick,
44
+ topLevelTypes.topFocus,
45
+ topLevelTypes.topInput,
46
+ topLevelTypes.topKeyDown,
47
+ topLevelTypes.topKeyUp,
48
+ topLevelTypes.topSelectionChange
49
+ ]
39
50
  }
40
51
  };
41
52
 
@@ -73,10 +84,21 @@ function manualDispatchChangeEvent(nativeEvent) {
73
84
  );
74
85
  EventPropagators.accumulateTwoPhaseDispatches(event);
75
86
 
76
- // If change bubbled, we'd just bind to it like all the other events
77
- // and have it go through ReactEventTopLevelCallback. Since it doesn't, we
78
- // manually listen for the change event and so we have to enqueue and
87
+ // If change and propertychange bubbled, we'd just bind to it like all the
88
+ // other events and have it go through ReactEventTopLevelCallback. Since it
89
+ // doesn't, we manually listen for the events and so we have to enqueue and
79
90
  // process the abstract event manually.
91
+ //
92
+ // Batching is necessary here in order to ensure that all event handlers run
93
+ // before the next rerender (including event handlers attached to ancestor
94
+ // elements instead of directly on the input). Without this, controlled
95
+ // components don't work properly in conjunction with event bubbling because
96
+ // the component is rerendered and the value reverted before all the event
97
+ // handlers can run. See https://github.com/facebook/react/issues/708.
98
+ ReactUpdates.batchedUpdates(runEventInBatch, event);
99
+ }
100
+
101
+ function runEventInBatch(event) {
80
102
  EventPluginHub.enqueueEvents(event);
81
103
  EventPluginHub.processEventQueue();
82
104
  }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright 2013 Facebook, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * @providesModule ClientReactRootIndex
17
+ * @typechecks
18
+ */
19
+
20
+ "use strict";
21
+
22
+ var nextReactRootIndex = 0;
23
+
24
+ var ClientReactRootIndex = {
25
+ createReactRootIndex: function() {
26
+ return nextReactRootIndex++;
27
+ }
28
+ };
29
+
30
+ module.exports = ClientReactRootIndex;
@@ -31,8 +31,22 @@ var keyOf = require("./keyOf");
31
31
  var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
32
32
  var START_KEYCODE = 229;
33
33
 
34
- var useCompositionEvent = ExecutionEnvironment.canUseDOM &&
35
- 'CompositionEvent' in window;
34
+ var useCompositionEvent = (
35
+ ExecutionEnvironment.canUseDOM &&
36
+ 'CompositionEvent' in window
37
+ );
38
+
39
+ // In IE9+, we have access to composition events, but the data supplied
40
+ // by the native compositionend event may be incorrect. In Korean, for example,
41
+ // the compositionend event contains only one character regardless of
42
+ // how many characters have been composed since compositionstart.
43
+ // We therefore use the fallback data while still using the native
44
+ // events as triggers.
45
+ var useFallbackData = (
46
+ !useCompositionEvent ||
47
+ 'documentMode' in document && document.documentMode > 8
48
+ );
49
+
36
50
  var topLevelTypes = EventConstants.topLevelTypes;
37
51
  var currentComposition = null;
38
52
 
@@ -42,19 +56,43 @@ var eventTypes = {
42
56
  phasedRegistrationNames: {
43
57
  bubbled: keyOf({onCompositionEnd: null}),
44
58
  captured: keyOf({onCompositionEndCapture: null})
45
- }
59
+ },
60
+ dependencies: [
61
+ topLevelTypes.topBlur,
62
+ topLevelTypes.topCompositionEnd,
63
+ topLevelTypes.topKeyDown,
64
+ topLevelTypes.topKeyPress,
65
+ topLevelTypes.topKeyUp,
66
+ topLevelTypes.topMouseDown
67
+ ]
46
68
  },
47
69
  compositionStart: {
48
70
  phasedRegistrationNames: {
49
71
  bubbled: keyOf({onCompositionStart: null}),
50
72
  captured: keyOf({onCompositionStartCapture: null})
51
- }
73
+ },
74
+ dependencies: [
75
+ topLevelTypes.topBlur,
76
+ topLevelTypes.topCompositionStart,
77
+ topLevelTypes.topKeyDown,
78
+ topLevelTypes.topKeyPress,
79
+ topLevelTypes.topKeyUp,
80
+ topLevelTypes.topMouseDown
81
+ ]
52
82
  },
53
83
  compositionUpdate: {
54
84
  phasedRegistrationNames: {
55
85
  bubbled: keyOf({onCompositionUpdate: null}),
56
86
  captured: keyOf({onCompositionUpdateCapture: null})
57
- }
87
+ },
88
+ dependencies: [
89
+ topLevelTypes.topBlur,
90
+ topLevelTypes.topCompositionUpdate,
91
+ topLevelTypes.topKeyDown,
92
+ topLevelTypes.topKeyPress,
93
+ topLevelTypes.topKeyUp,
94
+ topLevelTypes.topMouseDown
95
+ ]
58
96
  }
59
97
  };
60
98
 
@@ -183,13 +221,23 @@ var CompositionEventPlugin = {
183
221
  eventType = getCompositionEventType(topLevelType);
184
222
  } else if (!currentComposition) {
185
223
  if (isFallbackStart(topLevelType, nativeEvent)) {
186
- eventType = eventTypes.start;
187
- currentComposition = new FallbackCompositionState(topLevelTarget);
224
+ eventType = eventTypes.compositionStart;
188
225
  }
189
226
  } else if (isFallbackEnd(topLevelType, nativeEvent)) {
190
227
  eventType = eventTypes.compositionEnd;
191
- data = currentComposition.getData();
192
- currentComposition = null;
228
+ }
229
+
230
+ if (useFallbackData) {
231
+ // The current composition is stored statically and must not be
232
+ // overwritten while composition continues.
233
+ if (!currentComposition && eventType === eventTypes.compositionStart) {
234
+ currentComposition = new FallbackCompositionState(topLevelTarget);
235
+ } else if (eventType === eventTypes.compositionEnd) {
236
+ if (currentComposition) {
237
+ data = currentComposition.getData();
238
+ currentComposition = null;
239
+ }
240
+ }
193
241
  }
194
242
 
195
243
  if (eventType) {
@@ -30,7 +30,7 @@ var getTextContentAccessor = require("./getTextContentAccessor");
30
30
  * @type {string}
31
31
  * @private
32
32
  */
33
- var textContentAccessor = getTextContentAccessor() || 'NA';
33
+ var textContentAccessor = getTextContentAccessor();
34
34
 
35
35
  /**
36
36
  * Inserts `childNode` as a child of `parentNode` at the `index`.
@@ -57,6 +57,31 @@ function insertChildAt(parentNode, childNode, index) {
57
57
  }
58
58
  }
59
59
 
60
+ /**
61
+ * Sets the text content of `node` to `text`.
62
+ *
63
+ * @param {DOMElement} node Node to change
64
+ * @param {string} text New text content
65
+ */
66
+ var updateTextContent;
67
+ if (textContentAccessor === 'textContent') {
68
+ updateTextContent = function(node, text) {
69
+ node.textContent = text;
70
+ };
71
+ } else {
72
+ updateTextContent = function(node, text) {
73
+ // In order to preserve newlines correctly, we can't use .innerText to set
74
+ // the contents (see #1080), so we empty the element then append a text node
75
+ while (node.firstChild) {
76
+ node.removeChild(node.firstChild);
77
+ }
78
+ if (text) {
79
+ var doc = node.ownerDocument || document;
80
+ node.appendChild(doc.createTextNode(text));
81
+ }
82
+ };
83
+ }
84
+
60
85
  /**
61
86
  * Operations for updating with DOM children.
62
87
  */
@@ -64,6 +89,8 @@ var DOMChildrenOperations = {
64
89
 
65
90
  dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,
66
91
 
92
+ updateTextContent: updateTextContent,
93
+
67
94
  /**
68
95
  * Updates a component's children by processing a series of updates. The
69
96
  * update configurations are each expected to have a `parentNode` property.
@@ -121,7 +148,10 @@ var DOMChildrenOperations = {
121
148
  );
122
149
  break;
123
150
  case ReactMultiChildUpdateTypes.TEXT_CONTENT:
124
- update.parentNode[textContentAccessor] = update.textContent;
151
+ updateTextContent(
152
+ update.parentNode,
153
+ update.textContent
154
+ );
125
155
  break;
126
156
  case ReactMultiChildUpdateTypes.REMOVE_NODE:
127
157
  // Already removed by the for-loop above.
@@ -154,6 +154,8 @@ var defaultValueCache = {};
154
154
  */
155
155
  var DOMProperty = {
156
156
 
157
+ ID_ATTRIBUTE_NAME: 'data-reactid',
158
+
157
159
  /**
158
160
  * Checks whether a property name is a standard property.
159
161
  * @type {Object}
@@ -36,7 +36,6 @@ var processAttributeNameAndPrefix = memoizeStringOnly(function(name) {
36
36
 
37
37
  if ("production" !== process.env.NODE_ENV) {
38
38
  var reactProps = {
39
- __owner__: true,
40
39
  children: true,
41
40
  dangerouslySetInnerHTML: true,
42
41
  key: true,
@@ -72,6 +71,17 @@ if ("production" !== process.env.NODE_ENV) {
72
71
  */
73
72
  var DOMPropertyOperations = {
74
73
 
74
+ /**
75
+ * Creates markup for the ID property.
76
+ *
77
+ * @param {string} id Unescaped ID.
78
+ * @return {string} Markup string.
79
+ */
80
+ createMarkupForID: function(id) {
81
+ return processAttributeNameAndPrefix(DOMProperty.ID_ATTRIBUTE_NAME) +
82
+ escapeTextForBrowser(id) + '"';
83
+ },
84
+
75
85
  /**
76
86
  * Creates markup for a property.
77
87
  *
@@ -85,6 +95,9 @@ var DOMPropertyOperations = {
85
95
  return '';
86
96
  }
87
97
  var attributeName = DOMProperty.getAttributeName[name];
98
+ if (DOMProperty.hasBooleanValue[name]) {
99
+ return escapeTextForBrowser(attributeName);
100
+ }
88
101
  return processAttributeNameAndPrefix(attributeName) +
89
102
  escapeTextForBrowser(value) + '"';
90
103
  } else if (DOMProperty.isCustomAttribute(name)) {