OLD | NEW |
(Empty) | |
| 1 |
| 2 class _HistoryImpl extends _DOMTypeBase implements History { |
| 3 _HistoryImpl._wrap(ptr) : super._wrap(ptr); |
| 4 |
| 5 int get length() => _wrap(_ptr.length); |
| 6 |
| 7 Dynamic get state() => _wrap(_ptr.state); |
| 8 |
| 9 void back() { |
| 10 _ptr.back(); |
| 11 return; |
| 12 } |
| 13 |
| 14 void forward() { |
| 15 _ptr.forward(); |
| 16 return; |
| 17 } |
| 18 |
| 19 void go(int distance) { |
| 20 _ptr.go(_unwrap(distance)); |
| 21 return; |
| 22 } |
| 23 |
| 24 void pushState(Object data, String title, [String url = null]) { |
| 25 if (url === null) { |
| 26 _ptr.pushState(_unwrap(data), _unwrap(title)); |
| 27 return; |
| 28 } else { |
| 29 _ptr.pushState(_unwrap(data), _unwrap(title), _unwrap(url)); |
| 30 return; |
| 31 } |
| 32 } |
| 33 |
| 34 void replaceState(Object data, String title, [String url = null]) { |
| 35 if (url === null) { |
| 36 _ptr.replaceState(_unwrap(data), _unwrap(title)); |
| 37 return; |
| 38 } else { |
| 39 _ptr.replaceState(_unwrap(data), _unwrap(title), _unwrap(url)); |
| 40 return; |
| 41 } |
| 42 } |
| 43 } |
OLD | NEW |