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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
372 int creating = 0; // TODO(jacobr): I think I broke thise case. Will fix mo nday. | 372 int creating = 0; // TODO(jacobr): I think I broke thise case. Will fix mo nday. |
373 | 373 |
374 // If any JS code is hooked we want to call it too. | 374 // If any JS code is hooked we want to call it too. |
375 var oldCreatedCallback = js.JsNative.getProperty(elemProto, 'createdCallba ck'); | 375 var oldCreatedCallback = js.JsNative.getProperty(elemProto, 'createdCallba ck'); |
376 var oldAttributeChangedCallback = js.JsNative.getProperty(elemProto, 'attr ibuteChangedCallback'); | 376 var oldAttributeChangedCallback = js.JsNative.getProperty(elemProto, 'attr ibuteChangedCallback'); |
377 var oldAttachedCallback = js.JsNative.getProperty(elemProto, 'attachedCall back'); | 377 var oldAttachedCallback = js.JsNative.getProperty(elemProto, 'attachedCall back'); |
378 var oldDetachedCallback = js.JsNative.getProperty(elemProto, 'detachedCall back'); | 378 var oldDetachedCallback = js.JsNative.getProperty(elemProto, 'detachedCall back'); |
379 | 379 |
380 js.JsNative.setProperty(elemProto, 'createdCallback', js.allowInteropCaptu reThis(($this) { | 380 js.JsNative.setProperty(elemProto, 'createdCallback', js.allowInteropCaptu reThis(($this) { |
381 // The created callback has already been called by the very act of passi ng a JS | 381 // The created callback has already been called by the very act of passi ng a JS |
382 // custom element from JS to Dart. | 382 // custom element from JS to Dart. |
Jacob
2016/04/25 14:54:12
this previous comment says something conflicting a
| |
383 | |
384 // Make element's interceptor a CustomElementClass. | |
385 _blink.Blink_Utils.setInstanceInterceptorCustomUpgrade($this); | |
386 | |
383 if (oldCreatedCallback != null) | 387 if (oldCreatedCallback != null) |
384 oldCreatedCallback.apply([], thisArg: $this); | 388 oldCreatedCallback.apply([], thisArg: $this); |
385 })); | 389 })); |
386 js.JsNative.setProperty(elemProto, 'attributeChangedCallback', js.allowInt eropCaptureThis(($this, attrName, oldVal, newVal) { | 390 js.JsNative.setProperty(elemProto, 'attributeChangedCallback', js.allowInt eropCaptureThis(($this, attrName, oldVal, newVal) { |
387 $this.attributeChanged(attrName, oldVal, newVal); | 391 $this.attributeChanged(attrName, oldVal, newVal); |
388 | 392 |
389 if (oldAttributeChangedCallback != null) | 393 if (oldAttributeChangedCallback != null) |
390 oldAttributeChangedCallback.apply([], thisArg: $this); | 394 oldAttributeChangedCallback.apply([], thisArg: $this); |
391 })); | 395 })); |
392 js.JsNative.setProperty(elemProto, 'attachedCallback', js.allowInteropCapt ureThis(($this) { | 396 js.JsNative.setProperty(elemProto, 'attachedCallback', js.allowInteropCapt ureThis(($this) { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
466 /// parameter must be provided. | 470 /// parameter must be provided. |
467 @Experimental() | 471 @Experimental() |
468 ElementUpgrader createElementUpgrader(Type type, {String extendsTag}) { | 472 ElementUpgrader createElementUpgrader(Type type, {String extendsTag}) { |
469 $if DART2JS | 473 $if DART2JS |
470 return new _JSElementUpgrader(this, type, extendsTag); | 474 return new _JSElementUpgrader(this, type, extendsTag); |
471 $else | 475 $else |
472 return new _VMElementUpgrader(this, type, extendsTag); | 476 return new _VMElementUpgrader(this, type, extendsTag); |
473 $endif | 477 $endif |
474 } | 478 } |
475 } | 479 } |
OLD | NEW |