| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 @DocsEditable() | 7 @DocsEditable() |
| 8 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME extends Node | 8 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME extends Node |
| 9 { | 9 { |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 var wrapped; | 77 var wrapped; |
| 78 | 78 |
| 79 if (newElement['dart_class'] != null) { | 79 if (newElement['dart_class'] != null) { |
| 80 wrapped = newElement['dart_class']; // Here's our Dart class. | 80 wrapped = newElement['dart_class']; // Here's our Dart class. |
| 81 wrapped.blink_jsObject = newElement; | 81 wrapped.blink_jsObject = newElement; |
| 82 } else { | 82 } else { |
| 83 wrapped = wrap_jso(newElement); | 83 wrapped = wrap_jso(newElement); |
| 84 if (wrapped == null) { | 84 if (wrapped == null) { |
| 85 wrapped = wrap_jso_custom_element(newElement); | 85 wrapped = wrap_jso_custom_element(newElement); |
| 86 } else { |
| 87 wrapped.blink_jsObject['dart_class'] = wrapped; |
| 86 } | 88 } |
| 87 } | 89 } |
| 88 | 90 |
| 89 return wrapped; | 91 return wrapped; |
| 90 $endif | 92 $endif |
| 91 } | 93 } |
| 92 | 94 |
| 93 $if DART2JS | 95 $if DART2JS |
| 94 // The two-argument version of this is automatically generated, but we need to | 96 // The two-argument version of this is automatically generated, but we need to |
| 95 // omit the typeExtension if it's null on Firefox or we get an is="null" attri
bute. | 97 // omit the typeExtension if it's null on Firefox or we get an is="null" attri
bute. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 119 | 121 |
| 120 var wrapped; | 122 var wrapped; |
| 121 | 123 |
| 122 if (newElement['dart_class'] != null) { | 124 if (newElement['dart_class'] != null) { |
| 123 wrapped = newElement['dart_class']; // Here's our Dart class. | 125 wrapped = newElement['dart_class']; // Here's our Dart class. |
| 124 wrapped.blink_jsObject = newElement; | 126 wrapped.blink_jsObject = newElement; |
| 125 } else { | 127 } else { |
| 126 wrapped = wrap_jso(newElement); | 128 wrapped = wrap_jso(newElement); |
| 127 if (wrapped == null) { | 129 if (wrapped == null) { |
| 128 wrapped = wrap_jso_custom_element(newElement); | 130 wrapped = wrap_jso_custom_element(newElement); |
| 131 } else { |
| 132 wrapped.blink_jsObject['dart_class'] = wrapped; |
| 129 } | 133 } |
| 130 } | 134 } |
| 131 | 135 |
| 132 return wrapped; | 136 return wrapped; |
| 133 $endif | 137 $endif |
| 134 } | 138 } |
| 135 | 139 |
| 136 $if DART2JS | 140 $if DART2JS |
| 137 @DomName('Document.createNodeIterator') | 141 @DomName('Document.createNodeIterator') |
| 138 NodeIterator _createNodeIterator(Node root, | 142 NodeIterator _createNodeIterator(Node root, |
| 139 [int whatToShow, NodeFilter filter]) | 143 [int whatToShow, NodeFilter filter]) |
| 140 => JS('NodeIterator', '#.createNodeIterator(#, #, #, false)', | 144 => JS('NodeIterator', '#.createNodeIterator(#, #, #, false)', |
| 141 this, root, whatToShow, filter); | 145 this, root, whatToShow, filter); |
| 142 | 146 |
| 143 @DomName('Document.createTreeWalker') | 147 @DomName('Document.createTreeWalker') |
| 144 TreeWalker _createTreeWalker(Node root, | 148 TreeWalker _createTreeWalker(Node root, |
| 145 [int whatToShow, NodeFilter filter]) | 149 [int whatToShow, NodeFilter filter]) |
| 146 => JS('TreeWalker', '#.createTreeWalker(#, #, #, false)', | 150 => JS('TreeWalker', '#.createTreeWalker(#, #, #, false)', |
| 147 this, root, whatToShow, filter); | 151 this, root, whatToShow, filter); |
| 148 $endif | 152 $endif |
| 149 } | 153 } |
| OLD | NEW |