| 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)$(CLASS_MODIFIERS)class $CLASSNAME extends Node $NATIVESPEC | 8 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME extends Node $NATIVESPEC |
| 9 { | 9 { |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 /// Checks if [register] is supported on the current platform. | 31 /// Checks if [register] is supported on the current platform. |
| 32 bool get supportsRegister { | 32 bool get supportsRegister { |
| 33 $if DART2JS | 33 $if DART2JS |
| 34 return JS('bool', '("register" in #)', this); | 34 return JS('bool', '("register" in #)', this); |
| 35 $else | 35 $else |
| 36 return true; | 36 return true; |
| 37 $endif | 37 $endif |
| 38 } | 38 } |
| 39 |
| 40 @DomName('Document.createElement') |
| 41 Element createElement(String tagName, [String typeExtension]) { |
| 42 $if DART2JS |
| 43 return _createElement(tagName, typeExtension); |
| 44 $else |
| 45 if (typeExtension != null) { |
| 46 return _createElement(tagName, typeExtension); |
| 47 } else { |
| 48 // Fast-path for Dartium when typeExtension is not needed. |
| 49 return _Utils.createElement(this, tagName); |
| 50 } |
| 51 $endif |
| 52 } |
| 39 } | 53 } |
| OLD | NEW |