OLD | NEW |
1 /** | 1 /** |
2 * HTML elements and other resources for web-based applications that need to | 2 * HTML elements and other resources for web-based applications that need to |
3 * interact with the browser and the DOM (Document Object Model). | 3 * interact with the browser and the DOM (Document Object Model). |
4 * | 4 * |
5 * This library includes DOM element types, CSS styling, local storage, | 5 * This library includes DOM element types, CSS styling, local storage, |
6 * media, speech, events, and more. | 6 * media, speech, events, and more. |
7 * To get started, | 7 * To get started, |
8 * check out the [Element] class, the base class for many of the HTML | 8 * check out the [Element] class, the base class for many of the HTML |
9 * DOM types. | 9 * DOM types. |
10 * | 10 * |
(...skipping 8425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8436 @Experimental() | 8436 @Experimental() |
8437 ElementUpgrader createElementUpgrader(Type type, {String extendsTag}) { | 8437 ElementUpgrader createElementUpgrader(Type type, {String extendsTag}) { |
8438 throw 'ElementUpgrader not yet supported on DDC'; | 8438 throw 'ElementUpgrader not yet supported on DDC'; |
8439 } | 8439 } |
8440 } | 8440 } |
8441 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 8441 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
8442 // for details. All rights reserved. Use of this source code is governed by a | 8442 // for details. All rights reserved. Use of this source code is governed by a |
8443 // BSD-style license that can be found in the LICENSE file. | 8443 // BSD-style license that can be found in the LICENSE file. |
8444 | 8444 |
8445 | 8445 |
| 8446 @DocsEditable() |
| 8447 @DomName('HTMLHtmlElement') |
| 8448 @Native("HTMLHtmlElement") |
| 8449 class HtmlHtmlElement extends HtmlElement { |
| 8450 // To suppress missing implicit constructor warnings. |
| 8451 factory HtmlHtmlElement._() { throw new UnsupportedError("Not supported"); } |
| 8452 |
| 8453 @DomName('HTMLHtmlElement.HTMLHtmlElement') |
| 8454 @DocsEditable() |
| 8455 factory HtmlHtmlElement() => document.createElement("html"); |
| 8456 |
| 8457 |
| 8458 @Deprecated("Internal Use Only") |
| 8459 static HtmlHtmlElement internalCreateHtmlHtmlElement() { |
| 8460 return new HtmlHtmlElement.internal_(); |
| 8461 } |
| 8462 |
| 8463 @Deprecated("Internal Use Only") |
| 8464 HtmlHtmlElement.internal_() : super.internal_(); |
| 8465 |
| 8466 } |
| 8467 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8468 // for details. All rights reserved. Use of this source code is governed by a |
| 8469 // BSD-style license that can be found in the LICENSE file. |
| 8470 |
| 8471 |
8446 /** | 8472 /** |
8447 * A client-side XHR request for getting data from a URL, | 8473 * A client-side XHR request for getting data from a URL, |
8448 * formally known as XMLHttpRequest. | 8474 * formally known as XMLHttpRequest. |
8449 * | 8475 * |
8450 * HttpRequest can be used to obtain data from HTTP and FTP protocols, | 8476 * HttpRequest can be used to obtain data from HTTP and FTP protocols, |
8451 * and is useful for AJAX-style page updates. | 8477 * and is useful for AJAX-style page updates. |
8452 * | 8478 * |
8453 * The simplest way to get the contents of a text file, such as a | 8479 * The simplest way to get the contents of a text file, such as a |
8454 * JSON-formatted file, is with [getString]. | 8480 * JSON-formatted file, is with [getString]. |
8455 * For example, the following code gets the contents of a JSON file | 8481 * For example, the following code gets the contents of a JSON file |
(...skipping 2473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10929 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 10955 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
10930 // for details. All rights reserved. Use of this source code is governed by a | 10956 // for details. All rights reserved. Use of this source code is governed by a |
10931 // BSD-style license that can be found in the LICENSE file. | 10957 // BSD-style license that can be found in the LICENSE file. |
10932 | 10958 |
10933 | 10959 |
10934 @DomName('Navigator') | 10960 @DomName('Navigator') |
10935 @Native("Navigator") | 10961 @Native("Navigator") |
10936 class Navigator extends DartHtmlDomObject implements NavigatorCpu { | 10962 class Navigator extends DartHtmlDomObject implements NavigatorCpu { |
10937 | 10963 |
10938 | 10964 |
| 10965 @DomName('Navigator.language') |
| 10966 String get language => JS('String', '#.language || #.userLanguage', this.raw, |
| 10967 this.raw); |
10939 | 10968 |
10940 | 10969 |
10941 // To suppress missing implicit constructor warnings. | 10970 // To suppress missing implicit constructor warnings. |
10942 factory Navigator._() { throw new UnsupportedError("Not supported"); } | 10971 factory Navigator._() { throw new UnsupportedError("Not supported"); } |
10943 | 10972 |
10944 @Deprecated("Internal Use Only") | 10973 @Deprecated("Internal Use Only") |
10945 static Navigator internalCreateNavigator() { | 10974 static Navigator internalCreateNavigator() { |
10946 return new Navigator.internal_(); | 10975 return new Navigator.internal_(); |
10947 } | 10976 } |
10948 | 10977 |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12243 } | 12272 } |
12244 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 12273 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
12245 // for details. All rights reserved. Use of this source code is governed by a | 12274 // for details. All rights reserved. Use of this source code is governed by a |
12246 // BSD-style license that can be found in the LICENSE file. | 12275 // BSD-style license that can be found in the LICENSE file. |
12247 | 12276 |
12248 // WARNING: Do not edit - generated code. | 12277 // WARNING: Do not edit - generated code. |
12249 | 12278 |
12250 | 12279 |
12251 @DomName('RequestAnimationFrameCallback') | 12280 @DomName('RequestAnimationFrameCallback') |
12252 typedef void RequestAnimationFrameCallback(num highResTime); | 12281 typedef void RequestAnimationFrameCallback(num highResTime); |
| 12282 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 12283 // for details. All rights reserved. Use of this source code is governed by a |
| 12284 // BSD-style license that can be found in the LICENSE file. |
| 12285 |
| 12286 |
| 12287 @DocsEditable() |
| 12288 @DomName('Screen') |
| 12289 @Native("Screen") |
| 12290 class Screen extends DartHtmlDomObject { |
| 12291 |
| 12292 @DomName('Screen.availHeight') |
| 12293 @DomName('Screen.availLeft') |
| 12294 @DomName('Screen.availTop') |
| 12295 @DomName('Screen.availWidth') |
| 12296 Rectangle get available => new Rectangle(_availLeft, _availTop, _availWidth, |
| 12297 _availHeight); |
| 12298 // To suppress missing implicit constructor warnings. |
| 12299 factory Screen._() { throw new UnsupportedError("Not supported"); } |
| 12300 |
| 12301 @Deprecated("Internal Use Only") |
| 12302 static Screen internalCreateScreen() { |
| 12303 return new Screen.internal_(); |
| 12304 } |
| 12305 |
| 12306 @Deprecated("Internal Use Only") |
| 12307 Screen.internal_() { } |
| 12308 |
| 12309 bool operator ==(other) => unwrap_jso(other) == unwrap_jso(this) || identical(
this, other); |
| 12310 int get hashCode => unwrap_jso(this).hashCode; |
| 12311 |
| 12312 @JSName('availHeight') |
| 12313 @DomName('Screen.availHeight') |
| 12314 @DocsEditable() |
| 12315 int get _availHeight => wrap_jso(JS("int", "#.availHeight", this.raw)); |
| 12316 |
| 12317 @JSName('availLeft') |
| 12318 @DomName('Screen.availLeft') |
| 12319 @DocsEditable() |
| 12320 @Experimental() // nonstandard |
| 12321 int get _availLeft => wrap_jso(JS("int", "#.availLeft", this.raw)); |
| 12322 |
| 12323 @JSName('availTop') |
| 12324 @DomName('Screen.availTop') |
| 12325 @DocsEditable() |
| 12326 @Experimental() // nonstandard |
| 12327 int get _availTop => wrap_jso(JS("int", "#.availTop", this.raw)); |
| 12328 |
| 12329 @JSName('availWidth') |
| 12330 @DomName('Screen.availWidth') |
| 12331 @DocsEditable() |
| 12332 int get _availWidth => wrap_jso(JS("int", "#.availWidth", this.raw)); |
| 12333 |
| 12334 @DomName('Screen.colorDepth') |
| 12335 @DocsEditable() |
| 12336 int get colorDepth => wrap_jso(JS("int", "#.colorDepth", this.raw)); |
| 12337 |
| 12338 @DomName('Screen.height') |
| 12339 @DocsEditable() |
| 12340 int get height => wrap_jso(JS("int", "#.height", this.raw)); |
| 12341 |
| 12342 @DomName('Screen.pixelDepth') |
| 12343 @DocsEditable() |
| 12344 int get pixelDepth => wrap_jso(JS("int", "#.pixelDepth", this.raw)); |
| 12345 |
| 12346 @DomName('Screen.width') |
| 12347 @DocsEditable() |
| 12348 int get width => wrap_jso(JS("int", "#.width", this.raw)); |
| 12349 } |
12253 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 12350 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
12254 // for details. All rights reserved. Use of this source code is governed by a | 12351 // for details. All rights reserved. Use of this source code is governed by a |
12255 // BSD-style license that can be found in the LICENSE file. | 12352 // BSD-style license that can be found in the LICENSE file. |
12256 | 12353 |
12257 // WARNING: Do not edit - generated code. | 12354 // WARNING: Do not edit - generated code. |
12258 | 12355 |
12259 | 12356 |
12260 @DomName('ShadowRoot') | 12357 @DomName('ShadowRoot') |
12261 @SupportedBrowser(SupportedBrowser.CHROME, '26') | 12358 @SupportedBrowser(SupportedBrowser.CHROME, '26') |
12262 @Experimental() | 12359 @Experimental() |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13177 @DocsEditable() | 13274 @DocsEditable() |
13178 WindowBase get parent => _convertNativeToDart_Window(this._get_parent); | 13275 WindowBase get parent => _convertNativeToDart_Window(this._get_parent); |
13179 @JSName('parent') | 13276 @JSName('parent') |
13180 @DomName('Window.parent') | 13277 @DomName('Window.parent') |
13181 @DocsEditable() | 13278 @DocsEditable() |
13182 @Creates('Window|=Object') | 13279 @Creates('Window|=Object') |
13183 @Returns('Window|=Object') | 13280 @Returns('Window|=Object') |
13184 dynamic get _get_parent => wrap_jso(JS("dynamic", "#.parent", this.raw)); | 13281 dynamic get _get_parent => wrap_jso(JS("dynamic", "#.parent", this.raw)); |
13185 | 13282 |
13186 /** | 13283 /** |
| 13284 * Information about the screen displaying this window. |
| 13285 * |
| 13286 * ## Other resources |
| 13287 * |
| 13288 * * [The Screen interface specification] |
| 13289 * (http://www.w3.org/TR/cssom-view/#screen) from W3C. |
| 13290 */ |
| 13291 @DomName('Window.screen') |
| 13292 @DocsEditable() |
| 13293 Screen get screen => wrap_jso(JS("Screen", "#.screen", this.raw)); |
| 13294 |
| 13295 /** |
13187 * The distance from the left side of the screen to the left side of this | 13296 * The distance from the left side of the screen to the left side of this |
13188 * window. | 13297 * window. |
13189 * | 13298 * |
13190 * ## Other resources | 13299 * ## Other resources |
13191 * | 13300 * |
13192 * * [The Screen interface specification] | 13301 * * [The Screen interface specification] |
13193 * (http://www.w3.org/TR/cssom-view/#screen) from W3C. | 13302 * (http://www.w3.org/TR/cssom-view/#screen) from W3C. |
13194 */ | 13303 */ |
13195 @DomName('Window.screenLeft') | 13304 @DomName('Window.screenLeft') |
13196 @DocsEditable() | 13305 @DocsEditable() |
(...skipping 6307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19504 'Event': () => Event, | 19613 'Event': () => Event, |
19505 'EventTarget': () => EventTarget, | 19614 'EventTarget': () => EventTarget, |
19506 'HTMLAnchorElement': () => AnchorElement, | 19615 'HTMLAnchorElement': () => AnchorElement, |
19507 'HTMLBaseElement': () => BaseElement, | 19616 'HTMLBaseElement': () => BaseElement, |
19508 'HTMLBodyElement': () => BodyElement, | 19617 'HTMLBodyElement': () => BodyElement, |
19509 'HTMLCollection': () => HtmlCollection, | 19618 'HTMLCollection': () => HtmlCollection, |
19510 'HTMLDivElement': () => DivElement, | 19619 'HTMLDivElement': () => DivElement, |
19511 'HTMLDocument': () => HtmlDocument, | 19620 'HTMLDocument': () => HtmlDocument, |
19512 'HTMLElement': () => HtmlElement, | 19621 'HTMLElement': () => HtmlElement, |
19513 'HTMLHeadElement': () => HeadElement, | 19622 'HTMLHeadElement': () => HeadElement, |
| 19623 'HTMLHtmlElement': () => HtmlHtmlElement, |
19514 'HTMLInputElement': () => InputElement, | 19624 'HTMLInputElement': () => InputElement, |
19515 'HTMLStyleElement': () => StyleElement, | 19625 'HTMLStyleElement': () => StyleElement, |
19516 'HTMLTemplateElement': () => TemplateElement, | 19626 'HTMLTemplateElement': () => TemplateElement, |
19517 'History': () => History, | 19627 'History': () => History, |
19518 'KeyboardEvent': () => KeyboardEvent, | 19628 'KeyboardEvent': () => KeyboardEvent, |
19519 'Location': () => Location, | 19629 'Location': () => Location, |
19520 'MouseEvent': () => MouseEvent, | 19630 'MouseEvent': () => MouseEvent, |
19521 'NamedNodeMap': () => _NamedNodeMap, | 19631 'NamedNodeMap': () => _NamedNodeMap, |
19522 'Navigator': () => Navigator, | 19632 'Navigator': () => Navigator, |
19523 'NavigatorCPU': () => NavigatorCpu, | 19633 'NavigatorCPU': () => NavigatorCpu, |
19524 'Node': () => Node, | 19634 'Node': () => Node, |
19525 'NodeList': () => NodeList, | 19635 'NodeList': () => NodeList, |
19526 'ParentNode': () => ParentNode, | 19636 'ParentNode': () => ParentNode, |
19527 'ProgressEvent': () => ProgressEvent, | 19637 'ProgressEvent': () => ProgressEvent, |
19528 'Range': () => Range, | 19638 'Range': () => Range, |
| 19639 'Screen': () => Screen, |
19529 'ShadowRoot': () => ShadowRoot, | 19640 'ShadowRoot': () => ShadowRoot, |
19530 'Text': () => Text, | 19641 'Text': () => Text, |
19531 'UIEvent': () => UIEvent, | 19642 'UIEvent': () => UIEvent, |
19532 'URLUtils': () => UrlUtils, | 19643 'URLUtils': () => UrlUtils, |
19533 'Window': () => Window, | 19644 'Window': () => Window, |
19534 'XMLHttpRequest': () => HttpRequest, | 19645 'XMLHttpRequest': () => HttpRequest, |
19535 'XMLHttpRequestEventTarget': () => HttpRequestEventTarget, | 19646 'XMLHttpRequestEventTarget': () => HttpRequestEventTarget, |
19536 'XMLHttpRequestProgressEvent': () => _XMLHttpRequestProgressEvent, | 19647 'XMLHttpRequestProgressEvent': () => _XMLHttpRequestProgressEvent, |
19537 | 19648 |
19538 }; | 19649 }; |
(...skipping 15 matching lines...) Expand all Loading... |
19554 'Event': () => Event.internalCreateEvent, | 19665 'Event': () => Event.internalCreateEvent, |
19555 'EventTarget': () => EventTarget.internalCreateEventTarget, | 19666 'EventTarget': () => EventTarget.internalCreateEventTarget, |
19556 'HTMLAnchorElement': () => AnchorElement.internalCreateAnchorElement, | 19667 'HTMLAnchorElement': () => AnchorElement.internalCreateAnchorElement, |
19557 'HTMLBaseElement': () => BaseElement.internalCreateBaseElement, | 19668 'HTMLBaseElement': () => BaseElement.internalCreateBaseElement, |
19558 'HTMLBodyElement': () => BodyElement.internalCreateBodyElement, | 19669 'HTMLBodyElement': () => BodyElement.internalCreateBodyElement, |
19559 'HTMLCollection': () => HtmlCollection.internalCreateHtmlCollection, | 19670 'HTMLCollection': () => HtmlCollection.internalCreateHtmlCollection, |
19560 'HTMLDivElement': () => DivElement.internalCreateDivElement, | 19671 'HTMLDivElement': () => DivElement.internalCreateDivElement, |
19561 'HTMLDocument': () => HtmlDocument.internalCreateHtmlDocument, | 19672 'HTMLDocument': () => HtmlDocument.internalCreateHtmlDocument, |
19562 'HTMLElement': () => HtmlElement.internalCreateHtmlElement, | 19673 'HTMLElement': () => HtmlElement.internalCreateHtmlElement, |
19563 'HTMLHeadElement': () => HeadElement.internalCreateHeadElement, | 19674 'HTMLHeadElement': () => HeadElement.internalCreateHeadElement, |
| 19675 'HTMLHtmlElement': () => HtmlHtmlElement.internalCreateHtmlHtmlElement, |
19564 'HTMLInputElement': () => InputElement.internalCreateInputElement, | 19676 'HTMLInputElement': () => InputElement.internalCreateInputElement, |
19565 'HTMLStyleElement': () => StyleElement.internalCreateStyleElement, | 19677 'HTMLStyleElement': () => StyleElement.internalCreateStyleElement, |
19566 'HTMLTemplateElement': () => TemplateElement.internalCreateTemplateElement, | 19678 'HTMLTemplateElement': () => TemplateElement.internalCreateTemplateElement, |
19567 'History': () => History.internalCreateHistory, | 19679 'History': () => History.internalCreateHistory, |
19568 'KeyboardEvent': () => KeyboardEvent.internalCreateKeyboardEvent, | 19680 'KeyboardEvent': () => KeyboardEvent.internalCreateKeyboardEvent, |
19569 'Location': () => Location.internalCreateLocation, | 19681 'Location': () => Location.internalCreateLocation, |
19570 'MouseEvent': () => MouseEvent.internalCreateMouseEvent, | 19682 'MouseEvent': () => MouseEvent.internalCreateMouseEvent, |
19571 'NamedNodeMap': () => _NamedNodeMap.internalCreate_NamedNodeMap, | 19683 'NamedNodeMap': () => _NamedNodeMap.internalCreate_NamedNodeMap, |
19572 'Navigator': () => Navigator.internalCreateNavigator, | 19684 'Navigator': () => Navigator.internalCreateNavigator, |
19573 'Node': () => Node.internalCreateNode, | 19685 'Node': () => Node.internalCreateNode, |
19574 'NodeList': () => NodeList.internalCreateNodeList, | 19686 'NodeList': () => NodeList.internalCreateNodeList, |
19575 'ProgressEvent': () => ProgressEvent.internalCreateProgressEvent, | 19687 'ProgressEvent': () => ProgressEvent.internalCreateProgressEvent, |
19576 'Range': () => Range.internalCreateRange, | 19688 'Range': () => Range.internalCreateRange, |
| 19689 'Screen': () => Screen.internalCreateScreen, |
19577 'ShadowRoot': () => ShadowRoot.internalCreateShadowRoot, | 19690 'ShadowRoot': () => ShadowRoot.internalCreateShadowRoot, |
19578 'Text': () => Text.internalCreateText, | 19691 'Text': () => Text.internalCreateText, |
19579 'UIEvent': () => UIEvent.internalCreateUIEvent, | 19692 'UIEvent': () => UIEvent.internalCreateUIEvent, |
19580 'Window': () => Window.internalCreateWindow, | 19693 'Window': () => Window.internalCreateWindow, |
19581 'XMLHttpRequest': () => HttpRequest.internalCreateHttpRequest, | 19694 'XMLHttpRequest': () => HttpRequest.internalCreateHttpRequest, |
19582 'XMLHttpRequestEventTarget': () => HttpRequestEventTarget.internalCreateHttpRe
questEventTarget, | 19695 'XMLHttpRequestEventTarget': () => HttpRequestEventTarget.internalCreateHttpRe
questEventTarget, |
19583 'XMLHttpRequestProgressEvent': () => _XMLHttpRequestProgressEvent.internalCrea
te_XMLHttpRequestProgressEvent, | 19696 'XMLHttpRequestProgressEvent': () => _XMLHttpRequestProgressEvent.internalCrea
te_XMLHttpRequestProgressEvent, |
19584 | 19697 |
19585 }; | 19698 }; |
19586 | 19699 |
(...skipping 12 matching lines...) Expand all Loading... |
19599 return null; | 19712 return null; |
19600 } | 19713 } |
19601 | 19714 |
19602 Function _getHtmlFunction(String key) { | 19715 Function _getHtmlFunction(String key) { |
19603 if (htmlBlinkFunctionMap.containsKey(key)) { | 19716 if (htmlBlinkFunctionMap.containsKey(key)) { |
19604 return htmlBlinkFunctionMap[key](); | 19717 return htmlBlinkFunctionMap[key](); |
19605 } | 19718 } |
19606 return null; | 19719 return null; |
19607 } | 19720 } |
19608 | 19721 |
OLD | NEW |