Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: tools/dom/templates/html/dart2js/html_dart2js.darttemplate

Issue 19058002: Added some more documentation to top level Window. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Ran gosh. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // DO NOT EDIT - unless you are editing documentation as per: 5 // DO NOT EDIT - unless you are editing documentation as per:
6 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation 6 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation
7 // Auto-generated dart:html library. 7 // Auto-generated dart:html library.
8 8
9 /// The Dart HTML library. 9 /// The Dart HTML library.
10 /// 10 ///
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 part '$AUXILIARY_DIR/WrappedList.dart'; 56 part '$AUXILIARY_DIR/WrappedList.dart';
57 part '$AUXILIARY_DIR/dart2js_Conversions.dart'; 57 part '$AUXILIARY_DIR/dart2js_Conversions.dart';
58 part '$AUXILIARY_DIR/dart2js_DOMImplementation.dart'; 58 part '$AUXILIARY_DIR/dart2js_DOMImplementation.dart';
59 part '$AUXILIARY_DIR/dart2js_KeyEvent.dart'; 59 part '$AUXILIARY_DIR/dart2js_KeyEvent.dart';
60 part '$AUXILIARY_DIR/dart2js_LocationWrapper.dart'; 60 part '$AUXILIARY_DIR/dart2js_LocationWrapper.dart';
61 part '$AUXILIARY_DIR/dart2js_Platform.dart'; 61 part '$AUXILIARY_DIR/dart2js_Platform.dart';
62 part '$AUXILIARY_DIR/_ListIterators.dart'; 62 part '$AUXILIARY_DIR/_ListIterators.dart';
63 63
64 64
65 /** 65 /**
66 * The top-level Window object. 66 * Top-level container for a web page, which is usually a browser tab or window.
67 *
68 * Each web page loaded in the browser has its own [Window], which is a
69 * container for the web page.
70 *
71 * If the web page has any `<iframe>` elements, then each `iframe` has its own
72 * [Window] object, which is accessible only to that `iframe`.
73 *
74 * See also:
75 *
76 * * [Window](https://developer.mozilla.org/en-US/docs/Web/API/window) from MD N.
67 */ 77 */
68 Window get window => JS('Window', 'window'); 78 Window get window => JS('Window', 'window');
69 79
70 /** 80 /**
71 * The top-level Document object. 81 * Root node for all content in a web page.
72 */ 82 */
73 HtmlDocument get document => JS('HtmlDocument', 'document'); 83 HtmlDocument get document => JS('HtmlDocument', 'document');
74 84
75 Element query(String selector) => document.query(selector); 85 Element query(String selector) => document.query(selector);
76 ElementList queryAll(String selector) => document.queryAll(selector); 86 ElementList queryAll(String selector) => document.queryAll(selector);
77 87
78 // Workaround for tags like <cite> that lack their own Element subclass -- 88 // Workaround for tags like <cite> that lack their own Element subclass --
79 // Dart issue 1990. 89 // Dart issue 1990.
80 class _HTMLElement extends Element native "HTMLElement" { 90 class _HTMLElement extends Element native "HTMLElement" {
81 } 91 }
82 92
83 // Support for Send/ReceivePortSync. 93 // Support for Send/ReceivePortSync.
84 int _getNewIsolateId() { 94 int _getNewIsolateId() {
85 if (JS('bool', r'!window.$dart$isolate$counter')) { 95 if (JS('bool', r'!window.$dart$isolate$counter')) {
86 JS('void', r'window.$dart$isolate$counter = 1'); 96 JS('void', r'window.$dart$isolate$counter = 1');
87 } 97 }
88 return JS('int', r'window.$dart$isolate$counter++'); 98 return JS('int', r'window.$dart$isolate$counter++');
89 } 99 }
90 100
91 // Fast path to invoke JS send port. 101 // Fast path to invoke JS send port.
92 _callPortSync(int id, message) { 102 _callPortSync(int id, message) {
93 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); 103 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message);
94 } 104 }
95 105
96 Future<SendPort> spawnDomFunction(Function f) => 106 Future<SendPort> spawnDomFunction(Function f) =>
97 new Future.value(IsolateNatives.spawnDomFunction(f)); 107 new Future.value(IsolateNatives.spawnDomFunction(f));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698