| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 part of html; |
| 5 | 6 |
| 6 // On Firefox 11, the object obtained from 'window.location' is very strange. | 7 // On Firefox 11, the object obtained from 'window.location' is very strange. |
| 7 // It can't be monkey-patched and seems immune to putting methods on | 8 // It can't be monkey-patched and seems immune to putting methods on |
| 8 // Object.prototype. We are forced to wrap the object. | 9 // Object.prototype. We are forced to wrap the object. |
| 9 | 10 |
| 10 class _LocationWrapper implements LocalLocation { | 11 class _LocationWrapper implements LocalLocation { |
| 11 | 12 |
| 12 final _ptr; // Opaque reference to real location. | 13 final _ptr; // Opaque reference to real location. |
| 13 | 14 |
| 14 _LocationWrapper(this._ptr); | 15 _LocationWrapper(this._ptr); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void reload() => JS('void', '#.reload()', _ptr); | 75 void reload() => JS('void', '#.reload()', _ptr); |
| 75 | 76 |
| 76 void replace(String url) => JS('void', '#.replace(#)', _ptr, url); | 77 void replace(String url) => JS('void', '#.replace(#)', _ptr, url); |
| 77 | 78 |
| 78 String toString() => JS('String', '#.toString()', _ptr); | 79 String toString() => JS('String', '#.toString()', _ptr); |
| 79 | 80 |
| 80 | 81 |
| 81 static _get(p, m) => JS('var', '#[#]', p, m); | 82 static _get(p, m) => JS('var', '#[#]', p, m); |
| 82 static _set(p, m, v) => JS('void', '#[#] = #', p, m, v); | 83 static _set(p, m, v) => JS('void', '#[#] = #', p, m, v); |
| 83 } | 84 } |
| OLD | NEW |