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

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

Issue 11874003: Adding supported checks and flags to window.performance. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback. Created 7 years, 11 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 library html; 1 library html;
2 2
3 import 'dart:async'; 3 import 'dart:async';
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'dart:html_common'; 5 import 'dart:html_common';
6 import 'dart:indexed_db'; 6 import 'dart:indexed_db';
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 import 'dart:json' as json; 8 import 'dart:json' as json;
9 import 'dart:math'; 9 import 'dart:math';
10 import 'dart:svg' as svg; 10 import 'dart:svg' as svg;
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 @SupportedBrowser(SupportedBrowser.CHROME) 340 @SupportedBrowser(SupportedBrowser.CHROME)
341 @SupportedBrowser(SupportedBrowser.FIREFOX) 341 @SupportedBrowser(SupportedBrowser.FIREFOX)
342 @SupportedBrowser(SupportedBrowser.IE, '10') 342 @SupportedBrowser(SupportedBrowser.IE, '10')
343 @SupportedBrowser(SupportedBrowser.SAFARI) 343 @SupportedBrowser(SupportedBrowser.SAFARI)
344 class ArrayBuffer native "*ArrayBuffer" { 344 class ArrayBuffer native "*ArrayBuffer" {
345 345
346 ///@docsEditable true 346 ///@docsEditable true
347 factory ArrayBuffer(int length) => ArrayBuffer._create(length); 347 factory ArrayBuffer(int length) => ArrayBuffer._create(length);
348 static ArrayBuffer _create(int length) => JS('ArrayBuffer', 'new ArrayBuffer(# )', length); 348 static ArrayBuffer _create(int length) => JS('ArrayBuffer', 'new ArrayBuffer(# )', length);
349 349
350 /** 350 /// Checks if this type is supported on the current platform.
351 * Checks if this type is supported on the current platform
352 */
353 static bool get supported => JS('bool', 'typeof window.ArrayBuffer != "undefin ed"'); 351 static bool get supported => JS('bool', 'typeof window.ArrayBuffer != "undefin ed"');
354 352
355 /// @domName ArrayBuffer.byteLength; @docsEditable true 353 /// @domName ArrayBuffer.byteLength; @docsEditable true
356 final int byteLength; 354 final int byteLength;
357 355
358 /// @domName ArrayBuffer.slice; 356 /// @domName ArrayBuffer.slice;
359 ArrayBuffer slice(int begin, [int end]) { 357 ArrayBuffer slice(int begin, [int end]) {
360 // IE10 supports ArrayBuffers but does not have the slice method. 358 // IE10 supports ArrayBuffers but does not have the slice method.
361 if (JS('bool', '!!#.slice', this)) { 359 if (JS('bool', '!!#.slice', this)) {
362 if (?end) { 360 if (?end) {
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 1442
1445 1443
1446 /// @domName HTMLContentElement; @docsEditable true 1444 /// @domName HTMLContentElement; @docsEditable true
1447 @SupportedBrowser(SupportedBrowser.CHROME, '25') 1445 @SupportedBrowser(SupportedBrowser.CHROME, '25')
1448 @Experimental() 1446 @Experimental()
1449 class ContentElement extends Element native "*HTMLContentElement" { 1447 class ContentElement extends Element native "*HTMLContentElement" {
1450 1448
1451 ///@docsEditable true 1449 ///@docsEditable true
1452 factory ContentElement() => document.$dom_createElement("content"); 1450 factory ContentElement() => document.$dom_createElement("content");
1453 1451
1454 /** 1452 /// Checks if this type is supported on the current platform.
1455 * Checks if this type is supported on the current platform
1456 */
1457 static bool get supported => Element.isTagSupported('content'); 1453 static bool get supported => Element.isTagSupported('content');
1458 1454
1459 /// @domName HTMLContentElement.resetStyleInheritance; @docsEditable true 1455 /// @domName HTMLContentElement.resetStyleInheritance; @docsEditable true
1460 bool resetStyleInheritance; 1456 bool resetStyleInheritance;
1461 1457
1462 /// @domName HTMLContentElement.select; @docsEditable true 1458 /// @domName HTMLContentElement.select; @docsEditable true
1463 String select; 1459 String select;
1464 1460
1465 /// @domName HTMLContentElement.getDistributedNodes; @docsEditable true 1461 /// @domName HTMLContentElement.getDistributedNodes; @docsEditable true
1466 @Returns('NodeList') @Creates('NodeList') 1462 @Returns('NodeList') @Creates('NodeList')
(...skipping 3809 matching lines...) Expand 10 before | Expand all | Expand 10 after
5276 /// @domName HTMLDataListElement; @docsEditable true 5272 /// @domName HTMLDataListElement; @docsEditable true
5277 @SupportedBrowser(SupportedBrowser.CHROME) 5273 @SupportedBrowser(SupportedBrowser.CHROME)
5278 @SupportedBrowser(SupportedBrowser.FIREFOX) 5274 @SupportedBrowser(SupportedBrowser.FIREFOX)
5279 @SupportedBrowser(SupportedBrowser.IE, '10') 5275 @SupportedBrowser(SupportedBrowser.IE, '10')
5280 @SupportedBrowser(SupportedBrowser.SAFARI) 5276 @SupportedBrowser(SupportedBrowser.SAFARI)
5281 class DataListElement extends Element native "*HTMLDataListElement" { 5277 class DataListElement extends Element native "*HTMLDataListElement" {
5282 5278
5283 ///@docsEditable true 5279 ///@docsEditable true
5284 factory DataListElement() => document.$dom_createElement("datalist"); 5280 factory DataListElement() => document.$dom_createElement("datalist");
5285 5281
5286 /** 5282 /// Checks if this type is supported on the current platform.
5287 * Checks if this type is supported on the current platform
5288 */
5289 static bool get supported => Element.isTagSupported('datalist'); 5283 static bool get supported => Element.isTagSupported('datalist');
5290 5284
5291 /// @domName HTMLDataListElement.options; @docsEditable true 5285 /// @domName HTMLDataListElement.options; @docsEditable true
5292 final HtmlCollection options; 5286 final HtmlCollection options;
5293 } 5287 }
5294 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 5288 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
5295 // for details. All rights reserved. Use of this source code is governed by a 5289 // for details. All rights reserved. Use of this source code is governed by a
5296 // BSD-style license that can be found in the LICENSE file. 5290 // BSD-style license that can be found in the LICENSE file.
5297 5291
5298 5292
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
5505 5499
5506 /// @domName HTMLDetailsElement; @docsEditable true 5500 /// @domName HTMLDetailsElement; @docsEditable true
5507 @SupportedBrowser(SupportedBrowser.CHROME) 5501 @SupportedBrowser(SupportedBrowser.CHROME)
5508 @SupportedBrowser(SupportedBrowser.SAFARI) 5502 @SupportedBrowser(SupportedBrowser.SAFARI)
5509 @Experimental() 5503 @Experimental()
5510 class DetailsElement extends Element native "*HTMLDetailsElement" { 5504 class DetailsElement extends Element native "*HTMLDetailsElement" {
5511 5505
5512 ///@docsEditable true 5506 ///@docsEditable true
5513 factory DetailsElement() => document.$dom_createElement("details"); 5507 factory DetailsElement() => document.$dom_createElement("details");
5514 5508
5515 /** 5509 /// Checks if this type is supported on the current platform.
5516 * Checks if this type is supported on the current platform
5517 */
5518 static bool get supported => Element.isTagSupported('details'); 5510 static bool get supported => Element.isTagSupported('details');
5519 5511
5520 /// @domName HTMLDetailsElement.open; @docsEditable true 5512 /// @domName HTMLDetailsElement.open; @docsEditable true
5521 bool open; 5513 bool open;
5522 } 5514 }
5523 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 5515 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
5524 // for details. All rights reserved. Use of this source code is governed by a 5516 // for details. All rights reserved. Use of this source code is governed by a
5525 // BSD-style license that can be found in the LICENSE file. 5517 // BSD-style license that can be found in the LICENSE file.
5526 5518
5527 5519
(...skipping 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after
8435 8427
8436 /// @domName HTMLEmbedElement; @docsEditable true 8428 /// @domName HTMLEmbedElement; @docsEditable true
8437 @SupportedBrowser(SupportedBrowser.CHROME) 8429 @SupportedBrowser(SupportedBrowser.CHROME)
8438 @SupportedBrowser(SupportedBrowser.IE) 8430 @SupportedBrowser(SupportedBrowser.IE)
8439 @SupportedBrowser(SupportedBrowser.SAFARI) 8431 @SupportedBrowser(SupportedBrowser.SAFARI)
8440 class EmbedElement extends Element native "*HTMLEmbedElement" { 8432 class EmbedElement extends Element native "*HTMLEmbedElement" {
8441 8433
8442 ///@docsEditable true 8434 ///@docsEditable true
8443 factory EmbedElement() => document.$dom_createElement("embed"); 8435 factory EmbedElement() => document.$dom_createElement("embed");
8444 8436
8445 /** 8437 /// Checks if this type is supported on the current platform.
8446 * Checks if this type is supported on the current platform
8447 */
8448 static bool get supported => Element.isTagSupported('embed'); 8438 static bool get supported => Element.isTagSupported('embed');
8449 8439
8450 /// @domName HTMLEmbedElement.align; @docsEditable true 8440 /// @domName HTMLEmbedElement.align; @docsEditable true
8451 String align; 8441 String align;
8452 8442
8453 /// @domName HTMLEmbedElement.height; @docsEditable true 8443 /// @domName HTMLEmbedElement.height; @docsEditable true
8454 String height; 8444 String height;
8455 8445
8456 /// @domName HTMLEmbedElement.name; @docsEditable true 8446 /// @domName HTMLEmbedElement.name; @docsEditable true
8457 String name; 8447 String name;
(...skipping 4235 matching lines...) Expand 10 before | Expand all | Expand 10 after
12693 12683
12694 /// @domName HTMLKeygenElement; @docsEditable true 12684 /// @domName HTMLKeygenElement; @docsEditable true
12695 @SupportedBrowser(SupportedBrowser.CHROME) 12685 @SupportedBrowser(SupportedBrowser.CHROME)
12696 @SupportedBrowser(SupportedBrowser.SAFARI) 12686 @SupportedBrowser(SupportedBrowser.SAFARI)
12697 @Experimental() 12687 @Experimental()
12698 class KeygenElement extends Element native "*HTMLKeygenElement" { 12688 class KeygenElement extends Element native "*HTMLKeygenElement" {
12699 12689
12700 ///@docsEditable true 12690 ///@docsEditable true
12701 factory KeygenElement() => document.$dom_createElement("keygen"); 12691 factory KeygenElement() => document.$dom_createElement("keygen");
12702 12692
12703 /** 12693 /// Checks if this type is supported on the current platform.
12704 * Checks if this type is supported on the current platform
12705 */
12706 static bool get supported => Element.isTagSupported('keygen') && (new Element. tag('keygen') is KeygenElement); 12694 static bool get supported => Element.isTagSupported('keygen') && (new Element. tag('keygen') is KeygenElement);
12707 12695
12708 /// @domName HTMLKeygenElement.autofocus; @docsEditable true 12696 /// @domName HTMLKeygenElement.autofocus; @docsEditable true
12709 bool autofocus; 12697 bool autofocus;
12710 12698
12711 /// @domName HTMLKeygenElement.challenge; @docsEditable true 12699 /// @domName HTMLKeygenElement.challenge; @docsEditable true
12712 String challenge; 12700 String challenge;
12713 12701
12714 /// @domName HTMLKeygenElement.disabled; @docsEditable true 12702 /// @domName HTMLKeygenElement.disabled; @docsEditable true
12715 bool disabled; 12703 bool disabled;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
12914 String name; 12902 String name;
12915 } 12903 }
12916 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 12904 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
12917 // for details. All rights reserved. Use of this source code is governed by a 12905 // for details. All rights reserved. Use of this source code is governed by a
12918 // BSD-style license that can be found in the LICENSE file. 12906 // BSD-style license that can be found in the LICENSE file.
12919 12907
12920 12908
12921 /// @domName HTMLMarqueeElement; @docsEditable true 12909 /// @domName HTMLMarqueeElement; @docsEditable true
12922 class MarqueeElement extends Element native "*HTMLMarqueeElement" { 12910 class MarqueeElement extends Element native "*HTMLMarqueeElement" {
12923 12911
12924 /** 12912 /// Checks if this type is supported on the current platform.
12925 * Checks if this type is supported on the current platform
12926 */
12927 static bool get supported => Element.isTagSupported('marquee')&& (new Element. tag('marquee') is MarqueeElement); 12913 static bool get supported => Element.isTagSupported('marquee')&& (new Element. tag('marquee') is MarqueeElement);
12928 12914
12929 /// @domName HTMLMarqueeElement.behavior; @docsEditable true 12915 /// @domName HTMLMarqueeElement.behavior; @docsEditable true
12930 String behavior; 12916 String behavior;
12931 12917
12932 /// @domName HTMLMarqueeElement.bgColor; @docsEditable true 12918 /// @domName HTMLMarqueeElement.bgColor; @docsEditable true
12933 String bgColor; 12919 String bgColor;
12934 12920
12935 /// @domName HTMLMarqueeElement.direction; @docsEditable true 12921 /// @domName HTMLMarqueeElement.direction; @docsEditable true
12936 String direction; 12922 String direction;
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
13808 13794
13809 /// @domName HTMLMeterElement; @docsEditable true 13795 /// @domName HTMLMeterElement; @docsEditable true
13810 @SupportedBrowser(SupportedBrowser.CHROME) 13796 @SupportedBrowser(SupportedBrowser.CHROME)
13811 @SupportedBrowser(SupportedBrowser.FIREFOX) 13797 @SupportedBrowser(SupportedBrowser.FIREFOX)
13812 @SupportedBrowser(SupportedBrowser.SAFARI) 13798 @SupportedBrowser(SupportedBrowser.SAFARI)
13813 class MeterElement extends Element native "*HTMLMeterElement" { 13799 class MeterElement extends Element native "*HTMLMeterElement" {
13814 13800
13815 ///@docsEditable true 13801 ///@docsEditable true
13816 factory MeterElement() => document.$dom_createElement("meter"); 13802 factory MeterElement() => document.$dom_createElement("meter");
13817 13803
13818 /** 13804 /// Checks if this type is supported on the current platform.
13819 * Checks if this type is supported on the current platform
13820 */
13821 static bool get supported => Element.isTagSupported('meter'); 13805 static bool get supported => Element.isTagSupported('meter');
13822 13806
13823 /// @domName HTMLMeterElement.high; @docsEditable true 13807 /// @domName HTMLMeterElement.high; @docsEditable true
13824 num high; 13808 num high;
13825 13809
13826 /// @domName HTMLMeterElement.labels; @docsEditable true 13810 /// @domName HTMLMeterElement.labels; @docsEditable true
13827 @Returns('NodeList') @Creates('NodeList') 13811 @Returns('NodeList') @Creates('NodeList')
13828 final List<Node> labels; 13812 final List<Node> labels;
13829 13813
13830 /// @domName HTMLMeterElement.low; @docsEditable true 13814 /// @domName HTMLMeterElement.low; @docsEditable true
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
15189 15173
15190 /// @domName HTMLObjectElement; @docsEditable true 15174 /// @domName HTMLObjectElement; @docsEditable true
15191 @SupportedBrowser(SupportedBrowser.CHROME) 15175 @SupportedBrowser(SupportedBrowser.CHROME)
15192 @SupportedBrowser(SupportedBrowser.FIREFOX) 15176 @SupportedBrowser(SupportedBrowser.FIREFOX)
15193 @SupportedBrowser(SupportedBrowser.SAFARI) 15177 @SupportedBrowser(SupportedBrowser.SAFARI)
15194 class ObjectElement extends Element native "*HTMLObjectElement" { 15178 class ObjectElement extends Element native "*HTMLObjectElement" {
15195 15179
15196 ///@docsEditable true 15180 ///@docsEditable true
15197 factory ObjectElement() => document.$dom_createElement("object"); 15181 factory ObjectElement() => document.$dom_createElement("object");
15198 15182
15199 /** 15183 /// Checks if this type is supported on the current platform.
15200 * Checks if this type is supported on the current platform
15201 */
15202 static bool get supported => Element.isTagSupported('object'); 15184 static bool get supported => Element.isTagSupported('object');
15203 15185
15204 /// @domName HTMLObjectElement.code; @docsEditable true 15186 /// @domName HTMLObjectElement.code; @docsEditable true
15205 String code; 15187 String code;
15206 15188
15207 /// @domName HTMLObjectElement.data; @docsEditable true 15189 /// @domName HTMLObjectElement.data; @docsEditable true
15208 String data; 15190 String data;
15209 15191
15210 /// @domName HTMLObjectElement.form; @docsEditable true 15192 /// @domName HTMLObjectElement.form; @docsEditable true
15211 final FormElement form; 15193 final FormElement form;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
15377 15359
15378 /// @domName HTMLOutputElement; @docsEditable true 15360 /// @domName HTMLOutputElement; @docsEditable true
15379 @SupportedBrowser(SupportedBrowser.CHROME) 15361 @SupportedBrowser(SupportedBrowser.CHROME)
15380 @SupportedBrowser(SupportedBrowser.FIREFOX) 15362 @SupportedBrowser(SupportedBrowser.FIREFOX)
15381 @SupportedBrowser(SupportedBrowser.SAFARI) 15363 @SupportedBrowser(SupportedBrowser.SAFARI)
15382 class OutputElement extends Element native "*HTMLOutputElement" { 15364 class OutputElement extends Element native "*HTMLOutputElement" {
15383 15365
15384 ///@docsEditable true 15366 ///@docsEditable true
15385 factory OutputElement() => document.$dom_createElement("output"); 15367 factory OutputElement() => document.$dom_createElement("output");
15386 15368
15387 /** 15369 /// Checks if this type is supported on the current platform.
15388 * Checks if this type is supported on the current platform
15389 */
15390 static bool get supported => Element.isTagSupported('output'); 15370 static bool get supported => Element.isTagSupported('output');
15391 15371
15392 /// @domName HTMLOutputElement.defaultValue; @docsEditable true 15372 /// @domName HTMLOutputElement.defaultValue; @docsEditable true
15393 String defaultValue; 15373 String defaultValue;
15394 15374
15395 /// @domName HTMLOutputElement.form; @docsEditable true 15375 /// @domName HTMLOutputElement.form; @docsEditable true
15396 final FormElement form; 15376 final FormElement form;
15397 15377
15398 /// @domName HTMLOutputElement.htmlFor; @docsEditable true 15378 /// @domName HTMLOutputElement.htmlFor; @docsEditable true
15399 DomSettableTokenList htmlFor; 15379 DomSettableTokenList htmlFor;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
15507 15487
15508 /// @domName HTMLParamElement.value; @docsEditable true 15488 /// @domName HTMLParamElement.value; @docsEditable true
15509 String value; 15489 String value;
15510 } 15490 }
15511 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 15491 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
15512 // for details. All rights reserved. Use of this source code is governed by a 15492 // for details. All rights reserved. Use of this source code is governed by a
15513 // BSD-style license that can be found in the LICENSE file. 15493 // BSD-style license that can be found in the LICENSE file.
15514 15494
15515 15495
15516 /// @domName Performance; @docsEditable true 15496 /// @domName Performance; @docsEditable true
15497 @SupportedBrowser(SupportedBrowser.CHROME)
15498 @SupportedBrowser(SupportedBrowser.FIREFOX)
15499 @SupportedBrowser(SupportedBrowser.IE)
15517 class Performance extends EventTarget native "*Performance" { 15500 class Performance extends EventTarget native "*Performance" {
15518 15501
15502 /// Checks if this type is supported on the current platform.
15503 static bool get supported => JS('bool', '!!(window.performance)');
15504
15519 /// @domName Performance.memory; @docsEditable true 15505 /// @domName Performance.memory; @docsEditable true
15520 final MemoryInfo memory; 15506 final MemoryInfo memory;
15521 15507
15522 /// @domName Performance.navigation; @docsEditable true 15508 /// @domName Performance.navigation; @docsEditable true
15523 final PerformanceNavigation navigation; 15509 final PerformanceNavigation navigation;
15524 15510
15525 /// @domName Performance.timing; @docsEditable true 15511 /// @domName Performance.timing; @docsEditable true
15526 final PerformanceTiming timing; 15512 final PerformanceTiming timing;
15527 15513
15528 /// @domName Performance.now; @docsEditable true 15514 /// @domName Performance.now; @docsEditable true
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
15728 /// @domName HTMLProgressElement; @docsEditable true 15714 /// @domName HTMLProgressElement; @docsEditable true
15729 @SupportedBrowser(SupportedBrowser.CHROME) 15715 @SupportedBrowser(SupportedBrowser.CHROME)
15730 @SupportedBrowser(SupportedBrowser.FIREFOX) 15716 @SupportedBrowser(SupportedBrowser.FIREFOX)
15731 @SupportedBrowser(SupportedBrowser.IE, '10') 15717 @SupportedBrowser(SupportedBrowser.IE, '10')
15732 @SupportedBrowser(SupportedBrowser.SAFARI) 15718 @SupportedBrowser(SupportedBrowser.SAFARI)
15733 class ProgressElement extends Element native "*HTMLProgressElement" { 15719 class ProgressElement extends Element native "*HTMLProgressElement" {
15734 15720
15735 ///@docsEditable true 15721 ///@docsEditable true
15736 factory ProgressElement() => document.$dom_createElement("progress"); 15722 factory ProgressElement() => document.$dom_createElement("progress");
15737 15723
15738 /** 15724 /// Checks if this type is supported on the current platform.
15739 * Checks if this type is supported on the current platform
15740 */
15741 static bool get supported => Element.isTagSupported('progress'); 15725 static bool get supported => Element.isTagSupported('progress');
15742 15726
15743 /// @domName HTMLProgressElement.labels; @docsEditable true 15727 /// @domName HTMLProgressElement.labels; @docsEditable true
15744 @Returns('NodeList') @Creates('NodeList') 15728 @Returns('NodeList') @Creates('NodeList')
15745 final List<Node> labels; 15729 final List<Node> labels;
15746 15730
15747 /// @domName HTMLProgressElement.max; @docsEditable true 15731 /// @domName HTMLProgressElement.max; @docsEditable true
15748 num max; 15732 num max;
15749 15733
15750 /// @domName HTMLProgressElement.position; @docsEditable true 15734 /// @domName HTMLProgressElement.position; @docsEditable true
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
16611 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 16595 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
16612 // for details. All rights reserved. Use of this source code is governed by a 16596 // for details. All rights reserved. Use of this source code is governed by a
16613 // BSD-style license that can be found in the LICENSE file. 16597 // BSD-style license that can be found in the LICENSE file.
16614 16598
16615 16599
16616 /// @domName HTMLShadowElement; @docsEditable true 16600 /// @domName HTMLShadowElement; @docsEditable true
16617 @SupportedBrowser(SupportedBrowser.CHROME, '25') 16601 @SupportedBrowser(SupportedBrowser.CHROME, '25')
16618 @Experimental() 16602 @Experimental()
16619 class ShadowElement extends Element native "*HTMLShadowElement" { 16603 class ShadowElement extends Element native "*HTMLShadowElement" {
16620 16604
16621 /** 16605 /// Checks if this type is supported on the current platform.
16622 * Checks if this type is supported on the current platform
16623 */
16624 static bool get supported => Element.isTagSupported('shadow'); 16606 static bool get supported => Element.isTagSupported('shadow');
16625 16607
16626 /// @domName HTMLShadowElement.olderShadowRoot; @docsEditable true 16608 /// @domName HTMLShadowElement.olderShadowRoot; @docsEditable true
16627 final ShadowRoot olderShadowRoot; 16609 final ShadowRoot olderShadowRoot;
16628 16610
16629 /// @domName HTMLShadowElement.resetStyleInheritance; @docsEditable true 16611 /// @domName HTMLShadowElement.resetStyleInheritance; @docsEditable true
16630 bool resetStyleInheritance; 16612 bool resetStyleInheritance;
16631 } 16613 }
16632 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 16614 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
16633 // for details. All rights reserved. Use of this source code is governed by a 16615 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
18874 18856
18875 /// @domName HTMLTrackElement; @docsEditable true 18857 /// @domName HTMLTrackElement; @docsEditable true
18876 @SupportedBrowser(SupportedBrowser.CHROME) 18858 @SupportedBrowser(SupportedBrowser.CHROME)
18877 @SupportedBrowser(SupportedBrowser.IE, '10') 18859 @SupportedBrowser(SupportedBrowser.IE, '10')
18878 @SupportedBrowser(SupportedBrowser.SAFARI) 18860 @SupportedBrowser(SupportedBrowser.SAFARI)
18879 class TrackElement extends Element native "*HTMLTrackElement" { 18861 class TrackElement extends Element native "*HTMLTrackElement" {
18880 18862
18881 ///@docsEditable true 18863 ///@docsEditable true
18882 factory TrackElement() => document.$dom_createElement("track"); 18864 factory TrackElement() => document.$dom_createElement("track");
18883 18865
18884 /** 18866 /// Checks if this type is supported on the current platform.
18885 * Checks if this type is supported on the current platform
18886 */
18887 static bool get supported => Element.isTagSupported('track'); 18867 static bool get supported => Element.isTagSupported('track');
18888 18868
18889 static const int ERROR = 3; 18869 static const int ERROR = 3;
18890 18870
18891 static const int LOADED = 2; 18871 static const int LOADED = 2;
18892 18872
18893 static const int LOADING = 1; 18873 static const int LOADING = 1;
18894 18874
18895 static const int NONE = 0; 18875 static const int NONE = 0;
18896 18876
(...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
21109 @SupportedBrowser(SupportedBrowser.CHROME) 21089 @SupportedBrowser(SupportedBrowser.CHROME)
21110 @SupportedBrowser(SupportedBrowser.FIREFOX) 21090 @SupportedBrowser(SupportedBrowser.FIREFOX)
21111 @SupportedBrowser(SupportedBrowser.IE, '10') 21091 @SupportedBrowser(SupportedBrowser.IE, '10')
21112 @SupportedBrowser(SupportedBrowser.SAFARI) 21092 @SupportedBrowser(SupportedBrowser.SAFARI)
21113 class WebSocket extends EventTarget native "*WebSocket" { 21093 class WebSocket extends EventTarget native "*WebSocket" {
21114 21094
21115 ///@docsEditable true 21095 ///@docsEditable true
21116 factory WebSocket(String url) => WebSocket._create(url); 21096 factory WebSocket(String url) => WebSocket._create(url);
21117 static WebSocket _create(String url) => JS('WebSocket', 'new WebSocket(#)', ur l); 21097 static WebSocket _create(String url) => JS('WebSocket', 'new WebSocket(#)', ur l);
21118 21098
21119 /** 21099 /// Checks if this type is supported on the current platform.
21120 * Checks if this type is supported on the current platform
21121 */
21122 static bool get supported => JS('bool', 'typeof window.WebSocket != "undefined "'); 21100 static bool get supported => JS('bool', 'typeof window.WebSocket != "undefined "');
21123 21101
21124 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev entTarget.dispatchEvent; @docsEditable true 21102 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev entTarget.dispatchEvent; @docsEditable true
21125 WebSocketEvents get on => 21103 WebSocketEvents get on =>
21126 new WebSocketEvents(this); 21104 new WebSocketEvents(this);
21127 21105
21128 static const int CLOSED = 3; 21106 static const int CLOSED = 3;
21129 21107
21130 static const int CLOSING = 2; 21108 static const int CLOSING = 2;
21131 21109
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
21518 /// @domName Window.pageYOffset; @docsEditable true 21496 /// @domName Window.pageYOffset; @docsEditable true
21519 final int pageYOffset; 21497 final int pageYOffset;
21520 21498
21521 /// @domName Window.parent; @docsEditable true 21499 /// @domName Window.parent; @docsEditable true
21522 WindowBase get parent => _convertNativeToDart_Window(this._parent); 21500 WindowBase get parent => _convertNativeToDart_Window(this._parent);
21523 @JSName('parent') 21501 @JSName('parent')
21524 @Creates('Window|=Object') @Returns('Window|=Object') 21502 @Creates('Window|=Object') @Returns('Window|=Object')
21525 final dynamic _parent; 21503 final dynamic _parent;
21526 21504
21527 /// @domName Window.performance; @docsEditable true 21505 /// @domName Window.performance; @docsEditable true
21506 @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser. FIREFOX) @SupportedBrowser(SupportedBrowser.IE)
21528 final Performance performance; 21507 final Performance performance;
21529 21508
21530 /// @domName Window.personalbar; @docsEditable true 21509 /// @domName Window.personalbar; @docsEditable true
21531 final BarInfo personalbar; 21510 final BarInfo personalbar;
21532 21511
21533 /// @domName Window.screen; @docsEditable true 21512 /// @domName Window.screen; @docsEditable true
21534 final Screen screen; 21513 final Screen screen;
21535 21514
21536 /// @domName Window.screenLeft; @docsEditable true 21515 /// @domName Window.screenLeft; @docsEditable true
21537 final int screenLeft; 21516 final int screenLeft;
(...skipping 5453 matching lines...) Expand 10 before | Expand all | Expand 10 after
26991 _position = nextPosition; 26970 _position = nextPosition;
26992 return true; 26971 return true;
26993 } 26972 }
26994 _current = null; 26973 _current = null;
26995 _position = _array.length; 26974 _position = _array.length;
26996 return false; 26975 return false;
26997 } 26976 }
26998 26977
26999 T get current => _current; 26978 T get current => _current;
27000 } 26979 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tools/dom/scripts/htmldartgenerator.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698