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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 11416081: Added a lot more documentation to Window. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Ran go.sh Created 8 years, 1 month 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 | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 12157 matching lines...) Expand 10 before | Expand all | Expand 10 after
12168 12168
12169 /** @domName Window.addEventListener */ 12169 /** @domName Window.addEventListener */
12170 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native "addEventListener"; 12170 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]) native "addEventListener";
12171 12171
12172 /** @domName Window.alert */ 12172 /** @domName Window.alert */
12173 void alert(String message) native; 12173 void alert(String message) native;
12174 12174
12175 /** @domName Window.atob */ 12175 /** @domName Window.atob */
12176 String atob(String string) native; 12176 String atob(String string) native;
12177 12177
12178 /** @domName Window.blur */
12179 void blur() native;
12180
12181 /** @domName Window.btoa */ 12178 /** @domName Window.btoa */
12182 String btoa(String string) native; 12179 String btoa(String string) native;
12183 12180
12184 /** @domName Window.captureEvents */ 12181 /** @domName Window.captureEvents */
12185 void captureEvents() native; 12182 void captureEvents() native;
12186 12183
12187 /** @domName Window.clearInterval */ 12184 /** @domName Window.clearInterval */
12188 void clearInterval(int handle) native; 12185 void clearInterval(int handle) native;
12189 12186
12190 /** @domName Window.clearTimeout */ 12187 /** @domName Window.clearTimeout */
12191 void clearTimeout(int handle) native; 12188 void clearTimeout(int handle) native;
12192 12189
12193 /** @domName Window.close */ 12190 /** @domName Window.close */
12194 void close() native; 12191 void close() native;
12195 12192
12196 /** @domName Window.confirm */ 12193 /** @domName Window.confirm */
12197 bool confirm(String message) native; 12194 bool confirm(String message) native;
12198 12195
12199 /** @domName Window.dispatchEvent */ 12196 /** @domName Window.dispatchEvent */
12200 bool $dom_dispatchEvent(Event evt) native "dispatchEvent"; 12197 bool $dom_dispatchEvent(Event evt) native "dispatchEvent";
12201 12198
12202 /** @domName Window.find */ 12199 /** @domName Window.find */
12203 bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool w holeWord, bool searchInFrames, bool showDialog) native; 12200 bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool w holeWord, bool searchInFrames, bool showDialog) native;
12204 12201
12205 /** @domName Window.focus */
12206 void focus() native;
12207
12208 /** @domName Window.getComputedStyle */ 12202 /** @domName Window.getComputedStyle */
12209 CSSStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElemen t) native "getComputedStyle"; 12203 CSSStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElemen t) native "getComputedStyle";
12210 12204
12211 /** @domName Window.getMatchedCSSRules */ 12205 /** @domName Window.getMatchedCSSRules */
12212 List<CSSRule> getMatchedCSSRules(Element element, String pseudoElement) native ; 12206 List<CSSRule> getMatchedCSSRules(Element element, String pseudoElement) native ;
12213 12207
12214 /** @domName Window.getSelection */ 12208 /** @domName Window.getSelection */
12215 DOMSelection getSelection() native; 12209 DOMSelection getSelection() native;
12216 12210
12217 /** @domName Window.matchMedia */ 12211 /** @domName Window.matchMedia */
(...skipping 9975 matching lines...) Expand 10 before | Expand all | Expand 10 after
22193 * **Note:** This class represents any window, whereas [LocalWindow] is 22187 * **Note:** This class represents any window, whereas [LocalWindow] is
22194 * used to access the properties and content of the current window. 22188 * used to access the properties and content of the current window.
22195 * 22189 *
22196 * See also: 22190 * See also:
22197 * 22191 *
22198 * * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN. 22192 * * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN.
22199 * * [Window](http://www.w3.org/TR/Window/) from the W3C. 22193 * * [Window](http://www.w3.org/TR/Window/) from the W3C.
22200 */ 22194 */
22201 abstract class Window { 22195 abstract class Window {
22202 // Fields. 22196 // Fields.
22197
22198 /**
22199 * The current location of this window.
22200 *
22201 * Location currentLocation = window.location;
22202 * print(currentLocation.href); // 'http://www.example.com:80/'
22203 */
22203 Location get location; 22204 Location get location;
22204 History get history; 22205 History get history;
22205 22206
22207 /**
22208 * Indicates whether this window is closed.
22209 *
22210 * print(window.closed); // 'false'
22211 * window.close();
22212 * print(window.closed); // 'true'
22213 */
22206 bool get closed; 22214 bool get closed;
22215
22216 /**
22217 * A reference to the window that opened this one.
22218 *
22219 * Window thisWindow = window;
22220 * Window otherWindow = thisWindow.open('http://www.example.com/', 'foo');
22221 * print(otherWindow.opener == thisWindow); // 'true'
22222 */
22207 Window get opener; 22223 Window get opener;
22224
22225 /**
22226 * A reference to the parent of this window.
22227 *
22228 * If this [Window] has no parent, [parent] will return a reference to
22229 * the [Window] itself.
22230 *
22231 * IFrameElement myIFrame = new IFrameElement();
22232 * window.document.body.elements.add(myIFrame);
22233 * print(myIframe.contentWindow.parent == window) // 'true'
22234 *
22235 * print(window.parent == window) // 'true'
22236 */
22208 Window get parent; 22237 Window get parent;
22238
22239 /**
22240 * A reference to the topmost window in the window hierarchy.
22241 *
22242 * If this [Window] is the topmost [Window], [top] will return a reference to
22243 * the [Window] itself.
22244 *
22245 * // Add an IFrame to the current window.
22246 * IFrameElement myIFrame = new IFrameElement();
22247 * window.document.body.elements.add(myIFrame);
22248 *
22249 * // Add an IFrame inside of the other IFrame.
22250 * IFrameElement innerIFrame = new IFrameElement();
22251 * myIFrame.elements.add(innerIFrame);
22252 *
22253 * print(myIframe.contentWindow.top == window) // 'true'
22254 * print(innerIFrame.contentWindow.top == window) // 'true'
22255 *
22256 * print(window.top == window) // 'true'
22257 */
22209 Window get top; 22258 Window get top;
22210 22259
22211 // Methods. 22260 // Methods.
22212 void focus();
22213 void blur();
22214 void close(); 22261 void close();
22215 void postMessage(var message, String targetOrigin, [List messagePorts = null]) ; 22262 void postMessage(var message, String targetOrigin, [List messagePorts = null]) ;
22216 } 22263 }
22217 22264
22218 abstract class Location { 22265 abstract class Location {
22219 void set href(String val); 22266 void set href(String val);
22220 } 22267 }
22221 22268
22222 abstract class History { 22269 abstract class History {
22223 void back(); 22270 void back();
(...skipping 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after
25064 if (length < 0) throw new ArgumentError('length'); 25111 if (length < 0) throw new ArgumentError('length');
25065 if (start < 0) throw new RangeError.value(start); 25112 if (start < 0) throw new RangeError.value(start);
25066 int end = start + length; 25113 int end = start + length;
25067 if (end > a.length) throw new RangeError.value(end); 25114 if (end > a.length) throw new RangeError.value(end);
25068 for (int i = start; i < end; i++) { 25115 for (int i = start; i < end; i++) {
25069 accumulator.add(a[i]); 25116 accumulator.add(a[i]);
25070 } 25117 }
25071 return accumulator; 25118 return accumulator;
25072 } 25119 }
25073 } 25120 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698