| 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 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { | 5 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { |
| 6 | 6 |
| 7 _DocumentImpl get document() native "return this.document;"; | 7 _DocumentImpl get document() native "return this.document;"; |
| 8 | 8 |
| 9 Window get _top() native "return this.top;"; | 9 Window get _top() native "return this.top;"; |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 lookupPort(String name) { | 122 lookupPort(String name) { |
| 123 var port = JSON.parse(localStorage['dart-port:$name']); | 123 var port = JSON.parse(localStorage['dart-port:$name']); |
| 124 return _deserialize(port); | 124 return _deserialize(port); |
| 125 } | 125 } |
| 126 | 126 |
| 127 registerPort(String name, var port) { | 127 registerPort(String name, var port) { |
| 128 var serialized = _serialize(port); | 128 var serialized = _serialize(port); |
| 129 localStorage['dart-port:$name'] = JSON.stringify(serialized); | 129 localStorage['dart-port:$name'] = JSON.stringify(serialized); |
| 130 } | 130 } |
| 131 | 131 |
| 132 String createObjectUrl(object) native ''' | |
| 133 return (window.URL || window.webkitURL).createObjectURL(object) | |
| 134 '''; | |
| 135 | |
| 136 void revokeObjectUrl(String objectUrl) native ''' | |
| 137 (window.URL || window.webkitURL).revokeObjectURL(objectUrl) | |
| 138 '''; | |
| 139 $!MEMBERS | 132 $!MEMBERS |
| 140 } | 133 } |
| OLD | NEW |