| 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:isolate"); | 10 #import("dart:isolate"); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 | 62 |
| 63 _DocumentImpl get _document() { | 63 _DocumentImpl get _document() { |
| 64 if (__document == null) { | 64 if (__document == null) { |
| 65 _initialize(); | 65 _initialize(); |
| 66 } | 66 } |
| 67 return __document; | 67 return __document; |
| 68 } | 68 } |
| 69 | 69 |
| 70 _unwrap(raw) { | 70 _unwrap(raw) { |
| 71 return raw; |
| 71 return raw is _DOMTypeBase ? raw._ptr : raw; | 72 return raw is _DOMTypeBase ? raw._ptr : raw; |
| 72 } | 73 } |
| 73 | 74 |
| 74 // Warning: does not attempt wrap event listeners. | 75 // Warning: does not attempt wrap event listeners. |
| 75 _wrap(raw) { | 76 _wrap(raw) { |
| 77 return raw; |
| 76 if (raw is! _DOMWrapperBase) return raw; | 78 if (raw is! _DOMWrapperBase) return raw; |
| 77 _DOMWrapperBase domObject = raw; | 79 _DOMWrapperBase domObject = raw; |
| 78 if (domObject.dartObjectLocalStorage != null) | 80 if (domObject.dartObjectLocalStorage != null) |
| 79 return domObject.dartObjectLocalStorage; | 81 return domObject.dartObjectLocalStorage; |
| 80 switch(domObject.typeName) { | 82 switch(domObject.typeName) { |
| 81 case 'HTMLElement': | 83 case 'HTMLElement': |
| 82 return new _UnknownElementImpl._wrap(domObject); | 84 return new _UnknownElementImpl._wrap(domObject); |
| 83 $WRAPCASES | 85 $WRAPCASES |
| 84 case 'HTMLDocument': | 86 case 'HTMLDocument': |
| 85 return new _DocumentImpl._wrap(domObject); | 87 return new _DocumentImpl._wrap(domObject); |
| 86 default: | 88 default: |
| 87 throw 'Unrecognized object $domObject. Name=${domObject.typeName}'; | 89 throw 'Unrecognized object $domObject. Name=${domObject.typeName}'; |
| 88 } | 90 } |
| 89 } | 91 } |
| OLD | NEW |