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 // DO NOT EDIT | 5 // DO NOT EDIT |
6 // Auto-generated dart:html library. | 6 // Auto-generated dart:html library. |
7 | 7 |
8 /** | 8 /** |
9 * HTML elements and other resources for web-based applications that need to | 9 * HTML elements and other resources for web-based applications that need to |
10 * interact with the browser and the DOM (Document Object Model). | 10 * interact with the browser and the DOM (Document Object Model). |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 /****************************************************************************** | 349 /****************************************************************************** |
350 ********** ********** | 350 ********** ********** |
351 ********** JS Interop Support ********** | 351 ********** JS Interop Support ********** |
352 ********** ********** | 352 ********** ********** |
353 ******************************************************************************/ | 353 ******************************************************************************/ |
354 | 354 |
355 // List of known tagName to DartClass for custom elements, used for upgrade. | 355 // List of known tagName to DartClass for custom elements, used for upgrade. |
356 var _knownCustomElements = new Map<String, Map<Type, String>>(); | 356 var _knownCustomElements = new Map<String, Map<Type, String>>(); |
357 | 357 |
358 void _addCustomElementType(String tagName, Type dartClass, [String extendTag]) { | 358 void _addCustomElementType(String tagName, Type dartClass, [String extendTag]) { |
359 _knownCustomElements[tagName] = | 359 _knownCustomElements[tagName] = |
360 {'type': dartClass, 'extends': extendTag != null ? extendTag : "" }; | 360 {'type': dartClass, 'extends': extendTag != null ? extendTag : "" }; |
361 } | 361 } |
362 | 362 |
363 Type _getCustomElementType(object) { | 363 Type _getCustomElementType(object) { |
364 var entry = _getCustomElementEntry(object); | 364 var entry = _getCustomElementEntry(object); |
365 if (entry != null) { | 365 if (entry != null) { |
366 return entry['type']; | 366 return entry['type']; |
367 } | 367 } |
368 return null; | 368 return null; |
369 } | 369 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 tag = element['localName']; | 439 tag = element['localName']; |
440 } | 440 } |
441 } | 441 } |
442 } else { | 442 } else { |
443 throw new UnsupportedError('Element is incorrect type. Got ${runtimeType}, e
xpected HtmlElement/HtmlTemplate/JsObjectImpl.'); | 443 throw new UnsupportedError('Element is incorrect type. Got ${runtimeType}, e
xpected HtmlElement/HtmlTemplate/JsObjectImpl.'); |
444 } | 444 } |
445 | 445 |
446 return tag; | 446 return tag; |
447 } | 447 } |
448 | 448 |
449 Rectangle make_dart_rectangle(r) => | |
450 r == null ? null : new Rectangle( | |
451 js.JsNative.getProperty(r, 'left'), | |
452 js.JsNative.getProperty(r, 'top'), | |
453 js.JsNative.getProperty(r, 'width'), | |
454 js.JsNative.getProperty(r, 'height')); | |
455 | |
456 /// An abstract class for all DOM objects we wrap in dart:html and related | 449 /// An abstract class for all DOM objects we wrap in dart:html and related |
457 /// libraries. | 450 /// libraries. |
458 class DartHtmlDomObject { | 451 class DartHtmlDomObject { |
459 | 452 |
460 /// The underlying JS DOM object. | 453 /// The underlying JS DOM object. |
461 js.JsObject blink_jsObject; | 454 js.JsObject blink_jsObject; |
462 | 455 |
463 } | 456 } |
464 | 457 |
465 // Flag to disable JS interop asserts. Setting to false will speed up the | 458 // Flag to disable JS interop asserts. Setting to false will speed up the |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 } | 807 } |
815 | 808 |
816 return dartClass; | 809 return dartClass; |
817 } | 810 } |
818 | 811 |
819 $else | 812 $else |
820 class DartHtmlDomObject extends NativeFieldWrapperClass2 {} | 813 class DartHtmlDomObject extends NativeFieldWrapperClass2 {} |
821 | 814 |
822 unwrap_jso(dartClass_instance) => dartClass_instance; | 815 unwrap_jso(dartClass_instance) => dartClass_instance; |
823 wrap_jso(jsObject) => jsObject; | 816 wrap_jso(jsObject) => jsObject; |
824 make_dart_rectangle(r) => r; | |
825 convertDartToNative_Dictionary(Map dict) => dict; | 817 convertDartToNative_Dictionary(Map dict) => dict; |
826 List convertDartToNative_StringArray(List<String> input) => input; | 818 List convertDartToNative_StringArray(List<String> input) => input; |
827 convertDartToNative_List(List input) => input; | 819 convertDartToNative_List(List input) => input; |
828 createCustomUpgrader(Type customElementClass, $this) => $this; | 820 createCustomUpgrader(Type customElementClass, $this) => $this; |
829 | 821 |
830 $endif | 822 $endif |
OLD | NEW |