Chromium Code Reviews| 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 { | |
|
vsm
2013/09/25 22:27:40
Can you add a comment here to note that this is a
blois
2013/09/25 22:50:44
Done.
| |
| 48 return _Utils.createElement(this, tagName); | |
| 49 } | |
| 50 $endif | |
| 51 } | |
| 39 } | 52 } |
| OLD | NEW |