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

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: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * The current window.
Kathy Walrath 2013/07/11 17:15:35 You don't want to confuse an on-screen window with
Andrei Mouravski 2013/07/11 18:20:46 Done.
67 *
68 * Each web page loaded in the browser has its own [Window], which is a
69 * container for the web page.
70 *
71 * Each page's [Window] has an associated [HtmlDocument] that represents the
Kathy Walrath 2013/07/11 17:15:35 Why is this paragraph here? Either delete it or ma
Andrei Mouravski 2013/07/11 18:20:46 Done.
72 * content of the page.
73 *
74 * This getter usually retuns the only [Window] on the page, but any `<iframe>`
Kathy Walrath 2013/07/11 17:15:35 retuns -> returns Maybe combine this into the pre
75 * elements have their own [Window].
76 *
77 * See also:
78 *
79 * * [Window](https://developer.mozilla.org/en-US/docs/Web/API/window) from MD N.
67 */ 80 */
68 Window get window => JS('Window', 'window'); 81 Window get window => JS('Window', 'window');
blois 2013/07/11 17:03:57 Can you duplicate this into the Dartium version as
69 82
70 /** 83 /**
71 * The top-level Document object. 84 * The top-level Document object.
72 */ 85 */
73 HtmlDocument get document => JS('HtmlDocument', 'document'); 86 HtmlDocument get document => JS('HtmlDocument', 'document');
74 87
75 Element query(String selector) => document.query(selector); 88 Element query(String selector) => document.query(selector);
76 ElementList queryAll(String selector) => document.queryAll(selector); 89 ElementList queryAll(String selector) => document.queryAll(selector);
77 90
78 // Workaround for tags like <cite> that lack their own Element subclass -- 91 // Workaround for tags like <cite> that lack their own Element subclass --
79 // Dart issue 1990. 92 // Dart issue 1990.
80 class _HTMLElement extends Element native "HTMLElement" { 93 class _HTMLElement extends Element native "HTMLElement" {
81 } 94 }
82 95
83 // Support for Send/ReceivePortSync. 96 // Support for Send/ReceivePortSync.
84 int _getNewIsolateId() { 97 int _getNewIsolateId() {
85 if (JS('bool', r'!window.$dart$isolate$counter')) { 98 if (JS('bool', r'!window.$dart$isolate$counter')) {
86 JS('void', r'window.$dart$isolate$counter = 1'); 99 JS('void', r'window.$dart$isolate$counter = 1');
87 } 100 }
88 return JS('int', r'window.$dart$isolate$counter++'); 101 return JS('int', r'window.$dart$isolate$counter++');
89 } 102 }
90 103
91 // Fast path to invoke JS send port. 104 // Fast path to invoke JS send port.
92 _callPortSync(int id, message) { 105 _callPortSync(int id, message) {
93 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); 106 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message);
94 } 107 }
95 108
96 Future<SendPort> spawnDomFunction(Function f) => 109 Future<SendPort> spawnDomFunction(Function f) =>
97 new Future.value(IsolateNatives.spawnDomFunction(f)); 110 new Future.value(IsolateNatives.spawnDomFunction(f));
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698