OLD | NEW |
---|---|
1 #library('dom'); | 1 #library('dom'); |
2 | 2 |
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 // DO NOT EDIT | 7 // DO NOT EDIT |
8 // Auto-generated Dart DOM library. | 8 // Auto-generated Dart DOM library. |
9 | 9 |
10 | 10 |
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1200 String defaultStatus; | 1200 String defaultStatus; |
1201 | 1201 |
1202 String defaultstatus; | 1202 String defaultstatus; |
1203 | 1203 |
1204 final num devicePixelRatio; | 1204 final num devicePixelRatio; |
1205 | 1205 |
1206 final _DocumentJs document; | 1206 final _DocumentJs document; |
1207 | 1207 |
1208 final _EventJs event; | 1208 final _EventJs event; |
1209 | 1209 |
1210 final _ElementJs frameElement; | |
1211 | |
1212 final _DOMWindowJs frames; | 1210 final _DOMWindowJs frames; |
1213 | 1211 |
1214 final _HistoryJs history; | 1212 final _HistoryJs history; |
1215 | 1213 |
1216 final int innerHeight; | 1214 final int innerHeight; |
1217 | 1215 |
1218 final int innerWidth; | 1216 final int innerWidth; |
1219 | 1217 |
1220 final int length; | 1218 final int length; |
1221 | 1219 |
(...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2968 | 2966 |
2969 String align; | 2967 String align; |
2970 } | 2968 } |
2971 | 2969 |
2972 class _HTMLHtmlElementJs extends _HTMLElementJs implements HTMLHtmlElement nativ e "*HTMLHtmlElement" { | 2970 class _HTMLHtmlElementJs extends _HTMLElementJs implements HTMLHtmlElement nativ e "*HTMLHtmlElement" { |
2973 | 2971 |
2974 String manifest; | 2972 String manifest; |
2975 | 2973 |
2976 String version; | 2974 String version; |
2977 } | 2975 } |
2976 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
2977 // for details. All rights reserved. Use of this source code is governed by a | |
2978 // BSD-style license that can be found in the LICENSE file. | |
2978 | 2979 |
2979 class _HTMLIFrameElementJs extends _HTMLElementJs implements HTMLIFrameElement n ative "*HTMLIFrameElement" { | 2980 class _HTMLIFrameElementJs extends _HTMLElementJs implements HTMLIFrameElement n ative "*HTMLIFrameElement" { |
2980 | 2981 |
2981 String align; | 2982 String align; |
2982 | 2983 |
2983 final _DocumentJs contentDocument; | |
2984 | |
2985 final _DOMWindowJs contentWindow; | |
2986 | |
2987 String frameBorder; | 2984 String frameBorder; |
2988 | 2985 |
2989 String height; | 2986 String height; |
2990 | 2987 |
2991 String longDesc; | 2988 String longDesc; |
2992 | 2989 |
2993 String marginHeight; | 2990 String marginHeight; |
2994 | 2991 |
2995 String marginWidth; | 2992 String marginWidth; |
2996 | 2993 |
2997 String name; | 2994 String name; |
2998 | 2995 |
2999 String sandbox; | 2996 String sandbox; |
3000 | 2997 |
3001 String scrolling; | 2998 String scrolling; |
3002 | 2999 |
3003 String src; | 3000 String src; |
3004 | 3001 |
3005 String width; | 3002 String width; |
3006 | 3003 |
3007 _SVGDocumentJs getSVGDocument() native; | 3004 _SVGDocumentJs getSVGDocument() native; |
3005 | |
3006 | |
3007 Window get _contentWindow() native """ | |
sra1
2012/02/24 03:38:30
For short ones that fit on the same line I just go
vsm
2012/02/26 01:52:10
Done.
| |
3008 return this.contentWindow; | |
3009 """; | |
3010 | |
3011 // Override contentWindow to return secure wrapper. | |
3012 Window get contentWindow() { | |
3013 return _DOMWindowCrossFrameJs._createSafe(_contentWindow); | |
3014 } | |
3015 } | |
3016 | |
3017 // TODO(vsm): Unify with Dartium version. | |
sra1
2012/02/24 03:38:30
The file(s) containing this function is missing fr
vsm
2012/02/26 01:52:10
File added.
On 2012/02/24 03:38:30, sra1 wrote:
| |
3018 class _DOMWindowCrossFrameJs implements DOMType, DOMWindow { | |
sra1
2012/02/24 03:38:30
Drop the 'Js'. That is for native classes.
vsm
2012/02/26 01:52:10
Done.
| |
3019 // Private window. | |
3020 _DOMWindowJs _window; | |
3021 | |
3022 // DOMType | |
3023 var dartObjectLocalStorage; | |
3024 String get typeName() => "DOMWindow"; | |
3025 | |
3026 // Fields. | |
3027 // TODO(vsm): Wrap these two. | |
3028 History get history() => _window.history; | |
3029 Location get location() => _window.location; | |
3030 | |
3031 bool get closed() => _window.closed; | |
3032 int get length() => _window.length; | |
3033 DOMWindow get opener() => _createDOMWindowCrossFrame(_window.opener); | |
3034 DOMWindow get parent() => _createDOMWindowCrossFrame(_window.parent); | |
3035 DOMWindow get top() => _createDOMWindowCrossFrame(_window.top); | |
3036 | |
3037 // TODO(vsm): Why is this needed? How do I get a | |
3038 // NoSuchMethodException. | |
3039 var get document() { throw new Exception(); } | |
sra1
2012/02/24 03:38:30
This is weird.
I wonder if it is related to the to
vsm
2012/02/26 01:52:10
I'm going to remove this and mark as a bug.
On 20
| |
3040 | |
3041 // Methods. | |
3042 void focus() { | |
3043 _window.focus(); | |
3044 } | |
3045 | |
3046 void blur() { | |
3047 _window.blur(); | |
3048 } | |
3049 | |
3050 void close() { | |
3051 _window.close(); | |
3052 } | |
3053 | |
3054 void postMessage(Dynamic message, String targetOrigin, [List messagePorts = nu ll]) { | |
sra1
2012/02/24 03:38:30
Line length
vsm
2012/02/26 01:52:10
Done.
| |
3055 if (messagePorts == null) { | |
3056 _window.postMessage(message, targetOrigin); | |
3057 } else { | |
3058 _window.postMessage(message, targetOrigin, messagePorts); | |
3059 } | |
3060 } | |
3061 | |
3062 // Implementation support. | |
3063 _DOMWindowCrossFrameJs(this._window); | |
3064 | |
3065 static DOMWindow _createSafe(w) { | |
3066 // TODO(vsm): Check if it's the top-level window. Return unwrapped. | |
3067 | |
3068 // TODO(vsm): Cache or implement equality. | |
3069 return new _DOMWindowCrossFrameJs(w); | |
3070 } | |
3008 } | 3071 } |
3009 | 3072 |
3010 class _HTMLImageElementJs extends _HTMLElementJs implements HTMLImageElement nat ive "*HTMLImageElement" { | 3073 class _HTMLImageElementJs extends _HTMLElementJs implements HTMLImageElement nat ive "*HTMLImageElement" { |
3011 | 3074 |
3012 String align; | 3075 String align; |
3013 | 3076 |
3014 String alt; | 3077 String alt; |
3015 | 3078 |
3016 String border; | 3079 String border; |
3017 | 3080 |
(...skipping 20857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
23875 if (length < 0) throw new IllegalArgumentException('length'); | 23938 if (length < 0) throw new IllegalArgumentException('length'); |
23876 if (start < 0) throw new IndexOutOfRangeException(start); | 23939 if (start < 0) throw new IndexOutOfRangeException(start); |
23877 int end = start + length; | 23940 int end = start + length; |
23878 if (end > a.length) throw new IndexOutOfRangeException(end); | 23941 if (end > a.length) throw new IndexOutOfRangeException(end); |
23879 for (int i = start; i < end; i++) { | 23942 for (int i = start; i < end; i++) { |
23880 accumulator.add(a[i]); | 23943 accumulator.add(a[i]); |
23881 } | 23944 } |
23882 return accumulator; | 23945 return accumulator; |
23883 } | 23946 } |
23884 } | 23947 } |
OLD | NEW |