| 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 part of html; | 5 part of html; |
| 6 | 6 |
| 7 class _Property { | 7 class _Property { |
| 8 _Property(this.name) : | 8 _Property(this.name) : |
| 9 _hasValue = false, | 9 _hasValue = false, |
| 10 writable = false, | 10 writable = false, |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 static void _register(Document document, String tag, Type customType, | 803 static void _register(Document document, String tag, Type customType, |
| 804 String extendsTagName) => _blink.Blink_Utils.register(unwrap_jso(document),
tag, customType, extendsTagName); | 804 String extendsTagName) => _blink.Blink_Utils.register(unwrap_jso(document),
tag, customType, extendsTagName); |
| 805 | 805 |
| 806 static Element createElement(Document document, String tagName) => | 806 static Element createElement(Document document, String tagName) => |
| 807 wrap_jso(_blink.Blink_Utils.createElement(unwrap_jso(document), tagName)); | 807 wrap_jso(_blink.Blink_Utils.createElement(unwrap_jso(document), tagName)); |
| 808 | 808 |
| 809 static Element changeElementWrapper(HtmlElement element, Type type) => | 809 static Element changeElementWrapper(HtmlElement element, Type type) => |
| 810 _blink.Blink_Utils.changeElementWrapper(unwrap_jso(element), type); | 810 _blink.Blink_Utils.changeElementWrapper(unwrap_jso(element), type); |
| 811 } | 811 } |
| 812 | 812 |
| 813 class _DOMWindowCrossFrame extends NativeFieldWrapperClass2 implements | 813 class _DOMWindowCrossFrame extends DartHtmlDomObject implements |
| 814 WindowBase { | 814 WindowBase { |
| 815 /** Needed because KeyboardEvent is implements. | 815 /** Needed because KeyboardEvent is implements. |
| 816 * TODO(terry): Consider making blink_jsObject private (add underscore) for | 816 * TODO(terry): Consider making blink_jsObject private (add underscore) for |
| 817 * all blink_jsObject. Then needed private wrap/unwrap_jso | 817 * all blink_jsObject. Then needed private wrap/unwrap_jso |
| 818 * functions that delegate to a public wrap/unwrap_jso. | 818 * functions that delegate to a public wrap/unwrap_jso. |
| 819 */ | 819 */ |
| 820 js.JsObject blink_jsObject; | 820 js.JsObject blink_jsObject; |
| 821 | 821 |
| 822 _DOMWindowCrossFrame.internal(); | 822 _DOMWindowCrossFrame.internal(); |
| 823 | 823 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 854 // TODO(efortuna): Remove this method. dartbug.com/16814 | 854 // TODO(efortuna): Remove this method. dartbug.com/16814 |
| 855 void _removeEventListener([String type, EventListener listener, | 855 void _removeEventListener([String type, EventListener listener, |
| 856 bool useCapture]) => throw new UnsupportedError( | 856 bool useCapture]) => throw new UnsupportedError( |
| 857 'You can only attach EventListeners to your own window.'); | 857 'You can only attach EventListeners to your own window.'); |
| 858 // TODO(efortuna): Remove this method. dartbug.com/16814 | 858 // TODO(efortuna): Remove this method. dartbug.com/16814 |
| 859 void removeEventListener(String type, EventListener listener, | 859 void removeEventListener(String type, EventListener listener, |
| 860 [bool useCapture]) => throw new UnsupportedError( | 860 [bool useCapture]) => throw new UnsupportedError( |
| 861 'You can only attach EventListeners to your own window.'); | 861 'You can only attach EventListeners to your own window.'); |
| 862 } | 862 } |
| 863 | 863 |
| 864 class _HistoryCrossFrame extends NativeFieldWrapperClass2 implements HistoryBase
{ | 864 class _HistoryCrossFrame extends DartHtmlDomObject implements HistoryBase { |
| 865 _HistoryCrossFrame.internal(); | 865 _HistoryCrossFrame.internal(); |
| 866 | 866 |
| 867 // Methods. | 867 // Methods. |
| 868 void back() => _blink.Blink_HistoryCrossFrame.back(this); | 868 void back() => _blink.Blink_HistoryCrossFrame.back(this); |
| 869 void forward() => _blink.Blink_HistoryCrossFrame.forward(this); | 869 void forward() => _blink.Blink_HistoryCrossFrame.forward(this); |
| 870 void go(int distance) => _blink.Blink_HistoryCrossFrame.go(this, distance); | 870 void go(int distance) => _blink.Blink_HistoryCrossFrame.go(this, distance); |
| 871 | 871 |
| 872 // Implementation support. | 872 // Implementation support. |
| 873 String get typeName => "History"; | 873 String get typeName => "History"; |
| 874 } | 874 } |
| 875 | 875 |
| 876 class _LocationCrossFrame extends NativeFieldWrapperClass2 implements LocationBa
se { | 876 class _LocationCrossFrame extends DartHtmlDomObject implements LocationBase { |
| 877 _LocationCrossFrame.internal(); | 877 _LocationCrossFrame.internal(); |
| 878 | 878 |
| 879 // Fields. | 879 // Fields. |
| 880 set href(String h) => _blink.Blink_LocationCrossFrame.set_href(this, h); | 880 set href(String h) => _blink.Blink_LocationCrossFrame.set_href(this, h); |
| 881 | 881 |
| 882 // Implementation support. | 882 // Implementation support. |
| 883 String get typeName => "Location"; | 883 String get typeName => "Location"; |
| 884 } | 884 } |
| 885 | 885 |
| 886 class _DOMStringMap extends NativeFieldWrapperClass2 implements Map<String, Stri
ng> { | 886 class _DOMStringMap extends DartHtmlDomObject implements Map<String, String> { |
| 887 _DOMStringMap.internal(); | 887 _DOMStringMap.internal(); |
| 888 | 888 |
| 889 bool containsValue(String value) => Maps.containsValue(this, value); | 889 bool containsValue(String value) => Maps.containsValue(this, value); |
| 890 bool containsKey(String key) => _blink.Blink_DOMStringMap.containsKey(this, ke
y); | 890 bool containsKey(String key) => _blink.Blink_DOMStringMap.containsKey(this, ke
y); |
| 891 String operator [](String key) => _blink.Blink_DOMStringMap.item(this, key); | 891 String operator [](String key) => _blink.Blink_DOMStringMap.item(this, key); |
| 892 void operator []=(String key, String value) => _blink.Blink_DOMStringMap.setIt
em(this, key, value); | 892 void operator []=(String key, String value) => _blink.Blink_DOMStringMap.setIt
em(this, key, value); |
| 893 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke
y, ifAbsent); | 893 String putIfAbsent(String key, String ifAbsent()) => Maps.putIfAbsent(this, ke
y, ifAbsent); |
| 894 String remove(String key) => _blink.Blink_DOMStringMap.remove(this, key); | 894 String remove(String key) => _blink.Blink_DOMStringMap.remove(this, key); |
| 895 void clear() => Maps.clear(this); | 895 void clear() => Maps.clear(this); |
| 896 void forEach(void f(String key, String value)) => Maps.forEach(this, f); | 896 void forEach(void f(String key, String value)) => Maps.forEach(this, f); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 | 1107 |
| 1108 get _scheduleImmediateClosure => (void callback()) { | 1108 get _scheduleImmediateClosure => (void callback()) { |
| 1109 _scheduleImmediateHelper._schedule(callback); | 1109 _scheduleImmediateHelper._schedule(callback); |
| 1110 }; | 1110 }; |
| 1111 | 1111 |
| 1112 get _pureIsolateScheduleImmediateClosure => ((void callback()) => | 1112 get _pureIsolateScheduleImmediateClosure => ((void callback()) => |
| 1113 throw new UnimplementedError("scheduleMicrotask in background isolates " | 1113 throw new UnimplementedError("scheduleMicrotask in background isolates " |
| 1114 "are not supported in the browser")); | 1114 "are not supported in the browser")); |
| 1115 | 1115 |
| 1116 // Class for unsupported native browser 'DOM' objects. | 1116 // Class for unsupported native browser 'DOM' objects. |
| 1117 class _UnsupportedBrowserObject extends NativeFieldWrapperClass2 { | 1117 class _UnsupportedBrowserObject extends DartHtmlDomObject { |
| 1118 } | 1118 } |
| OLD | NEW |