Index: sdk/lib/html/dart2js/html_dart2js.dart |
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
index 4594b6730ada5bd083a6f460985fe9f19a5698af..2938a12b80fcf74810f252bb7db7d0c16f79d3d0 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -22184,7 +22184,7 @@ abstract class Window { |
History get history; |
/** |
- * Indicates whether this window is closed. |
+ * Indicates whether this window has been closed. |
* |
* print(window.closed); // 'false' |
* window.close(); |
@@ -22237,6 +22237,34 @@ abstract class Window { |
Window get top; |
// Methods. |
+ /** |
+ * Closes the window. |
+ * |
+ * This method should only succeed if the [Window] object is |
+ * **script-closeable** and the window calling [close] is allowed to navigate |
+ * the window. |
+ * |
+ * A window is script-closeable if it is either a window |
+ * that was opened by another window, or if it is a window with only one |
+ * document in its history. |
+ * |
+ * A window might not be allowed to navigate, and therefore close, another |
+ * window due to browser security features. |
+ * |
+ * var other = window.open('http://www.example.com', 'foo'); |
+ * // Closes other window, as it is script-closeable. |
+ * 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.
|
+ * print(other.closed()); // 'true' |
+ * |
+ * window.location('http://www.mysite.com', 'foo'); |
+ * // Does not close this window, as the history has changed. |
+ * window.close(); |
+ * print(window.closed()); // 'false' |
+ * |
+ * See also: |
+ * |
+ * * [DOM Window Close](http://www.w3.org/TR/html5/browsers.html#dom-window-close) 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.
|
+ */ |
void close(); |
void postMessage(var message, String targetOrigin, [List messagePorts = null]); |
} |