| 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 #library("html"); | 8 #library("html"); |
| 9 | 9 |
| 10 #import('dart:dom_deprecated', prefix:'dom'); | 10 #import("dart:isolate"); |
| 11 #import("dart:nativewrappers"); |
| 11 | 12 |
| 12 $!GENERATED_DART_FILES | 13 $!GENERATED_DART_FILES |
| 13 | 14 |
| 14 #source('$AUXILIARY_DIR/EventListener.dart'); | 15 #source('$AUXILIARY_DIR/EventListener.dart'); |
| 15 #source('$AUXILIARY_DIR/KeyLocation.dart'); | 16 #source('$AUXILIARY_DIR/KeyLocation.dart'); |
| 16 #source('$AUXILIARY_DIR/KeyName.dart'); | 17 #source('$AUXILIARY_DIR/KeyName.dart'); |
| 17 #source('$AUXILIARY_DIR/ReadyState.dart'); | 18 #source('$AUXILIARY_DIR/ReadyState.dart'); |
| 18 #source('$AUXILIARY_DIR/_Collections.dart'); | 19 #source('$AUXILIARY_DIR/_Collections.dart'); |
| 19 #source('$AUXILIARY_DIR/_XMLHttpRequestUtils.dart'); | 20 #source('$AUXILIARY_DIR/_XMLHttpRequestUtils.dart'); |
| 20 #source('$AUXILIARY_DIR/../../html/src/shared_FactoryProviders.dart'); | 21 #source('$AUXILIARY_DIR/../../html/src/shared_FactoryProviders.dart'); |
| 21 #source('$AUXILIARY_DIR/../../html/src/dartium_FactoryProviders.dart'); | 22 #source('$AUXILIARY_DIR/../../html/src/dartium_FactoryProviders.dart'); |
| 22 #source('$AUXILIARY_DIR/../../html/src/Measurement.dart'); | 23 #source('$AUXILIARY_DIR/../../html/src/Measurement.dart'); |
| 23 #source('$AUXILIARY_DIR/../../html/src/Device.dart'); | 24 #source('$AUXILIARY_DIR/../../html/src/Device.dart'); |
| 24 #source('$AUXILIARY_DIR/../../html/src/_Testing.dart'); | 25 #source('$AUXILIARY_DIR/../../html/src/_Testing.dart'); |
| 25 #source('$AUXILIARY_DIR/../../html/src/_DOMTypeBase.dart'); | 26 #source('$AUXILIARY_DIR/../../html/src/_DOMTypeBase.dart'); |
| 26 #source('$AUXILIARY_DIR/_ListIterators.dart'); | 27 #source('$AUXILIARY_DIR/_ListIterators.dart'); |
| 27 #source('$AUXILIARY_DIR/_Lists.dart'); | 28 #source('$AUXILIARY_DIR/_Lists.dart'); |
| 28 | 29 |
| 30 #source('$AUXILIARY_DIR/native_DOMWrapperBase.dart'); |
| 31 #source('$AUXILIARY_DIR/native_DOMImplementation.dart'); |
| 32 |
| 29 _WindowImpl __window; | 33 _WindowImpl __window; |
| 30 _DocumentImpl __document; | 34 _DocumentImpl __document; |
| 31 | 35 |
| 32 void _initialize() { | 36 void _initialize() { |
| 33 __window = _wrap(dom.window); | 37 __window = _wrap(_dom_window()); |
| 34 __document = _wrap(dom.document); | 38 __document = _wrap(_dom_window().document); |
| 35 } | 39 } |
| 36 | 40 |
| 37 Window get window() { | 41 Window get window() { |
| 38 if (__window == null) { | 42 if (__window == null) { |
| 39 _initialize(); | 43 _initialize(); |
| 40 } | 44 } |
| 41 return __window; | 45 return __window; |
| 42 } | 46 } |
| 43 | 47 |
| 44 Document get document() { | 48 Document get document() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 59 if (__document == null) { | 63 if (__document == null) { |
| 60 _initialize(); | 64 _initialize(); |
| 61 } | 65 } |
| 62 return __document; | 66 return __document; |
| 63 } | 67 } |
| 64 | 68 |
| 65 _unwrap(raw) { | 69 _unwrap(raw) { |
| 66 return raw is _DOMTypeBase ? raw._ptr : raw; | 70 return raw is _DOMTypeBase ? raw._ptr : raw; |
| 67 } | 71 } |
| 68 | 72 |
| 69 unwrap_internal(raw) => _unwrap(raw); | |
| 70 | |
| 71 // Warning: does not attempt wrap event listeners. | 73 // Warning: does not attempt wrap event listeners. |
| 72 _wrap(raw) { | 74 _wrap(raw) { |
| 73 if (raw is! dom.DOMType) return raw; | 75 if (raw is! _DOMWrapperBase) return raw; |
| 74 dom.DOMType domObject = raw; | 76 _DOMWrapperBase domObject = raw; |
| 75 if (domObject.dartObjectLocalStorage != null) | 77 if (domObject.dartObjectLocalStorage != null) |
| 76 return domObject.dartObjectLocalStorage; | 78 return domObject.dartObjectLocalStorage; |
| 77 switch(domObject.typeName) { | 79 switch(domObject.typeName) { |
| 78 case 'HTMLElement': | 80 case 'HTMLElement': |
| 79 return new _UnknownElementImpl._wrap(domObject); | 81 return new _UnknownElementImpl._wrap(domObject); |
| 80 $WRAPCASES | 82 $WRAPCASES |
| 81 case 'HTMLDocument': | 83 case 'HTMLDocument': |
| 82 return new _DocumentImpl._wrap(domObject); | 84 return new _DocumentImpl._wrap(domObject); |
| 83 default: | 85 default: |
| 84 throw 'Unrecognized object $domObject. Name=${domObject.typeName}'; | 86 throw 'Unrecognized object $domObject. Name=${domObject.typeName}'; |
| 85 } | 87 } |
| 86 } | 88 } |
| 87 | |
| 88 wrap_internal(raw) => _wrap(raw); | |
| 89 | |
| 90 spawnDomIsolate(Window targetWindow, String entryPoint) => | |
| 91 dom.spawnDomIsolate(_unwrap(targetWindow), entryPoint); | |
| 92 | |
| 93 dom.LayoutTestController get layoutTestController() => | |
| 94 dom.layoutTestController; | |
| OLD | NEW |