OLD | NEW |
---|---|
1 library html; | 1 library html; |
2 | 2 |
3 import 'dart:isolate'; | 3 import 'dart:isolate'; |
4 import 'dart:json'; | 4 import 'dart:json'; |
5 import 'dart:svg' as svg; | 5 import 'dart:svg' as svg; |
6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
7 // for details. All rights reserved. Use of this source code is governed by a | 7 // for details. All rights reserved. Use of this source code is governed by a |
8 // BSD-style license that can be found in the LICENSE file. | 8 // BSD-style license that can be found in the LICENSE file. |
9 | 9 |
10 // DO NOT EDIT | 10 // DO NOT EDIT |
(...skipping 22166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
22177 /** | 22177 /** |
22178 * The current location of this window. | 22178 * The current location of this window. |
22179 * | 22179 * |
22180 * Location currentLocation = window.location; | 22180 * Location currentLocation = window.location; |
22181 * print(currentLocation.href); // 'http://www.example.com:80/' | 22181 * print(currentLocation.href); // 'http://www.example.com:80/' |
22182 */ | 22182 */ |
22183 Location get location; | 22183 Location get location; |
22184 History get history; | 22184 History get history; |
22185 | 22185 |
22186 /** | 22186 /** |
22187 * Indicates whether this window is closed. | 22187 * Indicates whether this window has been closed. |
22188 * | 22188 * |
22189 * print(window.closed); // 'false' | 22189 * print(window.closed); // 'false' |
22190 * window.close(); | 22190 * window.close(); |
22191 * print(window.closed); // 'true' | 22191 * print(window.closed); // 'true' |
22192 */ | 22192 */ |
22193 bool get closed; | 22193 bool get closed; |
22194 | 22194 |
22195 /** | 22195 /** |
22196 * A reference to the window that opened this one. | 22196 * A reference to the window that opened this one. |
22197 * | 22197 * |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
22230 * myIFrame.elements.add(innerIFrame); | 22230 * myIFrame.elements.add(innerIFrame); |
22231 * | 22231 * |
22232 * print(myIframe.contentWindow.top == window) // 'true' | 22232 * print(myIframe.contentWindow.top == window) // 'true' |
22233 * print(innerIFrame.contentWindow.top == window) // 'true' | 22233 * print(innerIFrame.contentWindow.top == window) // 'true' |
22234 * | 22234 * |
22235 * print(window.top == window) // 'true' | 22235 * print(window.top == window) // 'true' |
22236 */ | 22236 */ |
22237 Window get top; | 22237 Window get top; |
22238 | 22238 |
22239 // Methods. | 22239 // Methods. |
22240 /** | |
22241 * Closes the window. | |
22242 * | |
22243 * This method should only succeed if the [Window] object is | |
22244 * **script-closeable** and the window calling [close] is allowed to navigate | |
22245 * the window. | |
22246 * | |
22247 * A window is script-closeable if it is either a window | |
22248 * that was opened by another window, or if it is a window with only one | |
22249 * document in its history. | |
22250 * | |
22251 * A window might not be allowed to navigate, and therefore close, another | |
22252 * window due to browser security features. | |
22253 * | |
22254 * var other = window.open('http://www.example.com', 'foo'); | |
22255 * // Closes other window, as it is script-closeable. | |
22256 * other.close();ยท | |
Kathy Walrath
2012/11/27 19:52:42
I see a strange dot character at the end of this l
Andrei Mouravski
2012/11/27 20:39:26
Done.
| |
22257 * print(other.closed()); // 'true' | |
22258 * | |
22259 * window.location('http://www.mysite.com', 'foo'); | |
22260 * // Does not close this window, as the history has changed. | |
22261 * window.close(); | |
22262 * print(window.closed()); // 'false' | |
22263 * | |
22264 * See also: | |
22265 * | |
22266 * * [DOM Window Close](http://www.w3.org/TR/html5/browsers.html#dom-window-cl ose) from the W3C. | |
Kathy Walrath
2012/11/27 19:52:42
DOM Window Close isn't a section title in the link
Andrei Mouravski
2012/11/27 20:39:26
Done.
| |
22267 */ | |
22240 void close(); | 22268 void close(); |
22241 void postMessage(var message, String targetOrigin, [List messagePorts = null]) ; | 22269 void postMessage(var message, String targetOrigin, [List messagePorts = null]) ; |
22242 } | 22270 } |
22243 | 22271 |
22244 abstract class Location { | 22272 abstract class Location { |
22245 void set href(String val); | 22273 void set href(String val); |
22246 } | 22274 } |
22247 | 22275 |
22248 abstract class History { | 22276 abstract class History { |
22249 void back(); | 22277 void back(); |
(...skipping 2836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
25086 if (length < 0) throw new ArgumentError('length'); | 25114 if (length < 0) throw new ArgumentError('length'); |
25087 if (start < 0) throw new RangeError.value(start); | 25115 if (start < 0) throw new RangeError.value(start); |
25088 int end = start + length; | 25116 int end = start + length; |
25089 if (end > a.length) throw new RangeError.value(end); | 25117 if (end > a.length) throw new RangeError.value(end); |
25090 for (int i = start; i < end; i++) { | 25118 for (int i = start; i < end; i++) { |
25091 accumulator.add(a[i]); | 25119 accumulator.add(a[i]); |
25092 } | 25120 } |
25093 return accumulator; | 25121 return accumulator; |
25094 } | 25122 } |
25095 } | 25123 } |
OLD | NEW |