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 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
6 | 6 |
7 part of $LIBRARYNAME; | 7 part of $LIBRARYNAME; |
8 | 8 |
9 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ | 9 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ |
10 $!MEMBERS | 10 $!MEMBERS |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 // TODO(jacobr): warning: | 395 // TODO(jacobr): warning: |
396 elemProto['createdCallback'] = js.JsNative.withThis(($this) { | 396 elemProto['createdCallback'] = js.JsNative.withThis(($this) { |
397 if (_getJSClassName(reflectClass(customElementClass).superclass) != null
&& creating < 2) { | 397 if (_getJSClassName(reflectClass(customElementClass).superclass) != null
&& creating < 2) { |
398 creating++; | 398 creating++; |
399 | 399 |
400 var dartClass; | 400 var dartClass; |
401 try { | 401 try { |
402 dartClass = _blink.Blink_Utils.constructElement(customElementClass,
$this); | 402 dartClass = _blink.Blink_Utils.constructElement(customElementClass,
$this); |
403 } catch (e) { | 403 } catch (e) { |
404 dartClass = HtmlElement.internalCreateHtmlElement(); | 404 dartClass = HtmlElement.internalCreateHtmlElement(); |
405 dartClass.badUpgrade(); | 405 dartClass._badUpgrade(); |
406 throw e; | 406 throw e; |
407 } finally { | 407 } finally { |
408 // Need to remember the Dart class that was created for this custom
so | 408 // Need to remember the Dart class that was created for this custom
so |
409 // return it and setup the blink_jsObject to the $this that we'll be
working | 409 // return it and setup the blink_jsObject to the $this that we'll be
working |
410 // with as we talk to blink. | 410 // with as we talk to blink. |
411 js.setDartHtmlWrapperFor($this, dartClass); | 411 js.setDartHtmlWrapperFor($this, dartClass); |
412 | 412 |
413 creating--; | 413 creating--; |
414 } | 414 } |
415 } | 415 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 /// parameter must be provided. | 487 /// parameter must be provided. |
488 @Experimental() | 488 @Experimental() |
489 ElementUpgrader createElementUpgrader(Type type, {String extendsTag}) { | 489 ElementUpgrader createElementUpgrader(Type type, {String extendsTag}) { |
490 $if DART2JS | 490 $if DART2JS |
491 return new _JSElementUpgrader(this, type, extendsTag); | 491 return new _JSElementUpgrader(this, type, extendsTag); |
492 $else | 492 $else |
493 return new _VMElementUpgrader(this, type, extendsTag); | 493 return new _VMElementUpgrader(this, type, extendsTag); |
494 $endif | 494 $endif |
495 } | 495 } |
496 } | 496 } |
OLD | NEW |