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

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

Issue 11679007: Adding support checks for partially supported element types and updating tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removing duplicated contentelement_test. Created 7 years, 12 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:collection'; 3 import 'dart:collection';
4 import 'dart:html_common'; 4 import 'dart:html_common';
5 import 'dart:indexed_db'; 5 import 'dart:indexed_db';
6 import 'dart:isolate'; 6 import 'dart:isolate';
7 import 'dart:json'; 7 import 'dart:json';
8 import 'dart:svg' as svg; 8 import 'dart:svg' as svg;
9 import 'dart:web_audio' as web_audio; 9 import 'dart:web_audio' as web_audio;
10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 10 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 /// @domName Console.clear; @docsEditable true 1450 /// @domName Console.clear; @docsEditable true
1451 void clear(Object arg) native; 1451 void clear(Object arg) native;
1452 1452
1453 } 1453 }
1454 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1454 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1455 // for details. All rights reserved. Use of this source code is governed by a 1455 // for details. All rights reserved. Use of this source code is governed by a
1456 // BSD-style license that can be found in the LICENSE file. 1456 // BSD-style license that can be found in the LICENSE file.
1457 1457
1458 1458
1459 /// @domName HTMLContentElement; @docsEditable true 1459 /// @domName HTMLContentElement; @docsEditable true
1460 @SupportedBrowser(SupportedBrowser.CHROME, '25')
1461 @Experimental()
1460 class ContentElement extends Element native "*HTMLContentElement" { 1462 class ContentElement extends Element native "*HTMLContentElement" {
1461 1463
1462 ///@docsEditable true 1464 ///@docsEditable true
1463 factory ContentElement() => document.$dom_createElement("content"); 1465 factory ContentElement() => document.$dom_createElement("content");
1464 1466
1467 /**
1468 * Checks if this type is supported on the current platform
1469 */
1470 static bool get supported => Element.isTagSupported('content');
1471
1465 /// @domName HTMLContentElement.resetStyleInheritance; @docsEditable true 1472 /// @domName HTMLContentElement.resetStyleInheritance; @docsEditable true
1466 bool resetStyleInheritance; 1473 bool resetStyleInheritance;
1467 1474
1468 /// @domName HTMLContentElement.select; @docsEditable true 1475 /// @domName HTMLContentElement.select; @docsEditable true
1469 String select; 1476 String select;
1470 1477
1471 /// @domName HTMLContentElement.getDistributedNodes; @docsEditable true 1478 /// @domName HTMLContentElement.getDistributedNodes; @docsEditable true
1472 @Returns('NodeList') @Creates('NodeList') 1479 @Returns('NodeList') @Creates('NodeList')
1473 List<Node> getDistributedNodes() native; 1480 List<Node> getDistributedNodes() native;
1474 } 1481 }
(...skipping 3797 matching lines...) Expand 10 before | Expand all | Expand 10 after
5272 5279
5273 /// @domName HTMLDListElement.compact; @docsEditable true 5280 /// @domName HTMLDListElement.compact; @docsEditable true
5274 bool compact; 5281 bool compact;
5275 } 5282 }
5276 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 5283 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
5277 // for details. All rights reserved. Use of this source code is governed by a 5284 // for details. All rights reserved. Use of this source code is governed by a
5278 // BSD-style license that can be found in the LICENSE file. 5285 // BSD-style license that can be found in the LICENSE file.
5279 5286
5280 5287
5281 /// @domName HTMLDataListElement; @docsEditable true 5288 /// @domName HTMLDataListElement; @docsEditable true
5289 @SupportedBrowser(SupportedBrowser.CHROME)
5290 @SupportedBrowser(SupportedBrowser.FIREFOX)
5291 @SupportedBrowser(SupportedBrowser.IE, '10')
5292 @SupportedBrowser(SupportedBrowser.SAFARI)
5282 class DataListElement extends Element native "*HTMLDataListElement" { 5293 class DataListElement extends Element native "*HTMLDataListElement" {
5283 5294
5284 ///@docsEditable true 5295 ///@docsEditable true
5285 factory DataListElement() => document.$dom_createElement("datalist"); 5296 factory DataListElement() => document.$dom_createElement("datalist");
5286 5297
5298 /**
5299 * Checks if this type is supported on the current platform
5300 */
5301 static bool get supported => Element.isTagSupported('datalist');
5302
5287 /// @domName HTMLDataListElement.options; @docsEditable true 5303 /// @domName HTMLDataListElement.options; @docsEditable true
5288 final HtmlCollection options; 5304 final HtmlCollection options;
5289 } 5305 }
5290 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 5306 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
5291 // for details. All rights reserved. Use of this source code is governed by a 5307 // for details. All rights reserved. Use of this source code is governed by a
5292 // BSD-style license that can be found in the LICENSE file. 5308 // BSD-style license that can be found in the LICENSE file.
5293 5309
5294 5310
5295 /// @domName DataTransferItem; @docsEditable true 5311 /// @domName DataTransferItem; @docsEditable true
5296 class DataTransferItem native "*DataTransferItem" { 5312 class DataTransferItem native "*DataTransferItem" {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
5493 5509
5494 /// @docsEditable true 5510 /// @docsEditable true
5495 EventListenerList get message => this['message']; 5511 EventListenerList get message => this['message'];
5496 } 5512 }
5497 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 5513 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
5498 // for details. All rights reserved. Use of this source code is governed by a 5514 // for details. All rights reserved. Use of this source code is governed by a
5499 // BSD-style license that can be found in the LICENSE file. 5515 // BSD-style license that can be found in the LICENSE file.
5500 5516
5501 5517
5502 /// @domName HTMLDetailsElement; @docsEditable true 5518 /// @domName HTMLDetailsElement; @docsEditable true
5519 @SupportedBrowser(SupportedBrowser.CHROME)
5520 @SupportedBrowser(SupportedBrowser.SAFARI)
5521 @Experimental()
5503 class DetailsElement extends Element native "*HTMLDetailsElement" { 5522 class DetailsElement extends Element native "*HTMLDetailsElement" {
5504 5523
5505 ///@docsEditable true 5524 ///@docsEditable true
5506 factory DetailsElement() => document.$dom_createElement("details"); 5525 factory DetailsElement() => document.$dom_createElement("details");
5507 5526
5527 /**
5528 * Checks if this type is supported on the current platform
5529 */
5530 static bool get supported => Element.isTagSupported('details');
5531
5508 /// @domName HTMLDetailsElement.open; @docsEditable true 5532 /// @domName HTMLDetailsElement.open; @docsEditable true
5509 bool open; 5533 bool open;
5510 } 5534 }
5511 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 5535 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
5512 // for details. All rights reserved. Use of this source code is governed by a 5536 // for details. All rights reserved. Use of this source code is governed by a
5513 // BSD-style license that can be found in the LICENSE file. 5537 // BSD-style license that can be found in the LICENSE file.
5514 5538
5515 5539
5516 /// @domName DeviceMotionEvent; @docsEditable true 5540 /// @domName DeviceMotionEvent; @docsEditable true
5517 class DeviceMotionEvent extends Event native "*DeviceMotionEvent" { 5541 class DeviceMotionEvent extends Event native "*DeviceMotionEvent" {
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after
7365 * [tag] should be a valid HTML tag name. If [tag] is an unknown tag then 7389 * [tag] should be a valid HTML tag name. If [tag] is an unknown tag then
7366 * this will create an [UnknownElement]. 7390 * this will create an [UnknownElement].
7367 * 7391 *
7368 * var divElement = new Element.tag('div'); 7392 * var divElement = new Element.tag('div');
7369 * print(divElement is DivElement); // 'true' 7393 * print(divElement is DivElement); // 'true'
7370 * var myElement = new Element.tag('unknownTag'); 7394 * var myElement = new Element.tag('unknownTag');
7371 * print(myElement is UnknownElement); // 'true' 7395 * print(myElement is UnknownElement); // 'true'
7372 * 7396 *
7373 * For standard elements it is more preferable to use the type constructors: 7397 * For standard elements it is more preferable to use the type constructors:
7374 * var element = new DivElement(); 7398 * var element = new DivElement();
7399 *
7400 * See also:
7401 *
7402 * * [isTagSupported]
7375 */ 7403 */
7376 factory Element.tag(String tag) => 7404 factory Element.tag(String tag) =>
7377 _ElementFactoryProvider.createElement_tag(tag); 7405 _ElementFactoryProvider.createElement_tag(tag);
7378 7406
7379 /** 7407 /**
7380 * All attributes on this element. 7408 * All attributes on this element.
7381 * 7409 *
7382 * Any modifications to the attribute map will automatically be applied to 7410 * Any modifications to the attribute map will automatically be applied to
7383 * this element. 7411 * this element.
7384 * 7412 *
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
7578 } 7606 }
7579 7607
7580 /** 7608 /**
7581 * Parses the specified text as HTML and adds the resulting node after the 7609 * Parses the specified text as HTML and adds the resulting node after the
7582 * last child of this element. 7610 * last child of this element.
7583 */ 7611 */
7584 void appendHtml(String text) { 7612 void appendHtml(String text) {
7585 this.insertAdjacentHtml('beforeend', text); 7613 this.insertAdjacentHtml('beforeend', text);
7586 } 7614 }
7587 7615
7616 /**
7617 * Checks to see if the tag name is supported by the current platform.
7618 *
7619 * The tag should be a valid HTML tag name.
7620 */
7621 static bool isTagSupported(String tag) {
7622 var e = _ElementFactoryProvider.createElement_tag(tag);
7623 return e is Element && !(e is UnknownElement);
7624 }
7625
7588 // Hooks to support custom WebComponents. 7626 // Hooks to support custom WebComponents.
7589 /** 7627 /**
7590 * Experimental support for [web components][wc]. This field stores a 7628 * Experimental support for [web components][wc]. This field stores a
7591 * reference to the component implementation. It was inspired by Mozilla's 7629 * reference to the component implementation. It was inspired by Mozilla's
7592 * [x-tags][] project. Please note: in the future it may be possible to 7630 * [x-tags][] project. Please note: in the future it may be possible to
7593 * `extend Element` from your class, in which case this field will be 7631 * `extend Element` from your class, in which case this field will be
7594 * deprecated and will simply return this [Element] object. 7632 * deprecated and will simply return this [Element] object.
7595 * 7633 *
7596 * [wc]: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html 7634 * [wc]: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html
7597 * [x-tags]: http://x-tags.org/ 7635 * [x-tags]: http://x-tags.org/
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
7974 throw new ArgumentError('HTML had ${temp.children.length} ' 8012 throw new ArgumentError('HTML had ${temp.children.length} '
7975 'top level elements but 1 expected'); 8013 'top level elements but 1 expected');
7976 } 8014 }
7977 element.remove(); 8015 element.remove();
7978 return element; 8016 return element;
7979 } 8017 }
7980 8018
7981 /** @domName Document.createElement */ 8019 /** @domName Document.createElement */
7982 // Optimization to improve performance until the dart2js compiler inlines this 8020 // Optimization to improve performance until the dart2js compiler inlines this
7983 // method. 8021 // method.
7984 static Element createElement_tag(String tag) => 8022 static dynamic createElement_tag(String tag) =>
7985 JS('Element', 'document.createElement(#)', tag); 8023 JS('Element', 'document.createElement(#)', tag);
7986 } 8024 }
7987 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 8025 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
7988 // for details. All rights reserved. Use of this source code is governed by a 8026 // for details. All rights reserved. Use of this source code is governed by a
7989 // BSD-style license that can be found in the LICENSE file. 8027 // BSD-style license that can be found in the LICENSE file.
7990 8028
7991 8029
7992 class ElementEvents extends Events { 8030 class ElementEvents extends Events {
7993 ElementEvents(EventTarget _ptr) : super(_ptr); 8031 ElementEvents(EventTarget _ptr) : super(_ptr);
7994 8032
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
8163 Element nextElementSibling; 8201 Element nextElementSibling;
8164 8202
8165 Element previousElementSibling; 8203 Element previousElementSibling;
8166 } 8204 }
8167 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 8205 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
8168 // for details. All rights reserved. Use of this source code is governed by a 8206 // for details. All rights reserved. Use of this source code is governed by a
8169 // BSD-style license that can be found in the LICENSE file. 8207 // BSD-style license that can be found in the LICENSE file.
8170 8208
8171 8209
8172 /// @domName HTMLEmbedElement; @docsEditable true 8210 /// @domName HTMLEmbedElement; @docsEditable true
8211 @SupportedBrowser(SupportedBrowser.CHROME)
8212 @SupportedBrowser(SupportedBrowser.IE)
8213 @SupportedBrowser(SupportedBrowser.SAFARI)
8173 class EmbedElement extends Element native "*HTMLEmbedElement" { 8214 class EmbedElement extends Element native "*HTMLEmbedElement" {
8174 8215
8175 ///@docsEditable true 8216 ///@docsEditable true
8176 factory EmbedElement() => document.$dom_createElement("embed"); 8217 factory EmbedElement() => document.$dom_createElement("embed");
8177 8218
8219 /**
8220 * Checks if this type is supported on the current platform
8221 */
8222 static bool get supported => Element.isTagSupported('embed');
8223
8178 /// @domName HTMLEmbedElement.align; @docsEditable true 8224 /// @domName HTMLEmbedElement.align; @docsEditable true
8179 String align; 8225 String align;
8180 8226
8181 /// @domName HTMLEmbedElement.height; @docsEditable true 8227 /// @domName HTMLEmbedElement.height; @docsEditable true
8182 String height; 8228 String height;
8183 8229
8184 /// @domName HTMLEmbedElement.name; @docsEditable true 8230 /// @domName HTMLEmbedElement.name; @docsEditable true
8185 String name; 8231 String name;
8186 8232
8187 /// @domName HTMLEmbedElement.src; @docsEditable true 8233 /// @domName HTMLEmbedElement.src; @docsEditable true
(...skipping 3749 matching lines...) Expand 10 before | Expand all | Expand 10 after
11937 /// @domName KeyboardEvent.shiftKey; @docsEditable true 11983 /// @domName KeyboardEvent.shiftKey; @docsEditable true
11938 final bool shiftKey; 11984 final bool shiftKey;
11939 11985
11940 } 11986 }
11941 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 11987 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
11942 // for details. All rights reserved. Use of this source code is governed by a 11988 // for details. All rights reserved. Use of this source code is governed by a
11943 // BSD-style license that can be found in the LICENSE file. 11989 // BSD-style license that can be found in the LICENSE file.
11944 11990
11945 11991
11946 /// @domName HTMLKeygenElement; @docsEditable true 11992 /// @domName HTMLKeygenElement; @docsEditable true
11993 @SupportedBrowser(SupportedBrowser.CHROME)
11994 @SupportedBrowser(SupportedBrowser.SAFARI)
11995 @Experimental()
11947 class KeygenElement extends Element native "*HTMLKeygenElement" { 11996 class KeygenElement extends Element native "*HTMLKeygenElement" {
11948 11997
11949 ///@docsEditable true 11998 ///@docsEditable true
11950 factory KeygenElement() => document.$dom_createElement("keygen"); 11999 factory KeygenElement() => document.$dom_createElement("keygen");
11951 12000
12001 /**
12002 * Checks if this type is supported on the current platform
12003 */
12004 static bool get supported => Element.isTagSupported('keygen') && (new Element. tag('keygen') is KeygenElement);
12005
11952 /// @domName HTMLKeygenElement.autofocus; @docsEditable true 12006 /// @domName HTMLKeygenElement.autofocus; @docsEditable true
11953 bool autofocus; 12007 bool autofocus;
11954 12008
11955 /// @domName HTMLKeygenElement.challenge; @docsEditable true 12009 /// @domName HTMLKeygenElement.challenge; @docsEditable true
11956 String challenge; 12010 String challenge;
11957 12011
11958 /// @domName HTMLKeygenElement.disabled; @docsEditable true 12012 /// @domName HTMLKeygenElement.disabled; @docsEditable true
11959 bool disabled; 12013 bool disabled;
11960 12014
11961 /// @domName HTMLKeygenElement.form; @docsEditable true 12015 /// @domName HTMLKeygenElement.form; @docsEditable true
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
12167 String name; 12221 String name;
12168 } 12222 }
12169 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 12223 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
12170 // for details. All rights reserved. Use of this source code is governed by a 12224 // for details. All rights reserved. Use of this source code is governed by a
12171 // BSD-style license that can be found in the LICENSE file. 12225 // BSD-style license that can be found in the LICENSE file.
12172 12226
12173 12227
12174 /// @domName HTMLMarqueeElement; @docsEditable true 12228 /// @domName HTMLMarqueeElement; @docsEditable true
12175 class MarqueeElement extends Element native "*HTMLMarqueeElement" { 12229 class MarqueeElement extends Element native "*HTMLMarqueeElement" {
12176 12230
12231 /**
12232 * Checks if this type is supported on the current platform
12233 */
12234 static bool get supported => Element.isTagSupported('marquee')&& (new Element. tag('marquee') is MarqueeElement);
12235
12177 /// @domName HTMLMarqueeElement.behavior; @docsEditable true 12236 /// @domName HTMLMarqueeElement.behavior; @docsEditable true
12178 String behavior; 12237 String behavior;
12179 12238
12180 /// @domName HTMLMarqueeElement.bgColor; @docsEditable true 12239 /// @domName HTMLMarqueeElement.bgColor; @docsEditable true
12181 String bgColor; 12240 String bgColor;
12182 12241
12183 /// @domName HTMLMarqueeElement.direction; @docsEditable true 12242 /// @domName HTMLMarqueeElement.direction; @docsEditable true
12184 String direction; 12243 String direction;
12185 12244
12186 /// @domName HTMLMarqueeElement.height; @docsEditable true 12245 /// @domName HTMLMarqueeElement.height; @docsEditable true
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
13051 // WARNING: Do not edit - generated code. 13110 // WARNING: Do not edit - generated code.
13052 13111
13053 13112
13054 typedef void MetadataCallback(Metadata metadata); 13113 typedef void MetadataCallback(Metadata metadata);
13055 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 13114 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
13056 // for details. All rights reserved. Use of this source code is governed by a 13115 // for details. All rights reserved. Use of this source code is governed by a
13057 // BSD-style license that can be found in the LICENSE file. 13116 // BSD-style license that can be found in the LICENSE file.
13058 13117
13059 13118
13060 /// @domName HTMLMeterElement; @docsEditable true 13119 /// @domName HTMLMeterElement; @docsEditable true
13120 @SupportedBrowser(SupportedBrowser.CHROME)
13121 @SupportedBrowser(SupportedBrowser.FIREFOX)
13122 @SupportedBrowser(SupportedBrowser.SAFARI)
13061 class MeterElement extends Element native "*HTMLMeterElement" { 13123 class MeterElement extends Element native "*HTMLMeterElement" {
13062 13124
13063 ///@docsEditable true 13125 ///@docsEditable true
13064 factory MeterElement() => document.$dom_createElement("meter"); 13126 factory MeterElement() => document.$dom_createElement("meter");
13065 13127
13128 /**
13129 * Checks if this type is supported on the current platform
13130 */
13131 static bool get supported => Element.isTagSupported('meter');
13132
13066 /// @domName HTMLMeterElement.high; @docsEditable true 13133 /// @domName HTMLMeterElement.high; @docsEditable true
13067 num high; 13134 num high;
13068 13135
13069 /// @domName HTMLMeterElement.labels; @docsEditable true 13136 /// @domName HTMLMeterElement.labels; @docsEditable true
13070 @Returns('NodeList') @Creates('NodeList') 13137 @Returns('NodeList') @Creates('NodeList')
13071 final List<Node> labels; 13138 final List<Node> labels;
13072 13139
13073 /// @domName HTMLMeterElement.low; @docsEditable true 13140 /// @domName HTMLMeterElement.low; @docsEditable true
13074 num low; 13141 num low;
13075 13142
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
14281 14348
14282 /// @domName HTMLOListElement.type; @docsEditable true 14349 /// @domName HTMLOListElement.type; @docsEditable true
14283 String type; 14350 String type;
14284 } 14351 }
14285 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 14352 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
14286 // for details. All rights reserved. Use of this source code is governed by a 14353 // for details. All rights reserved. Use of this source code is governed by a
14287 // BSD-style license that can be found in the LICENSE file. 14354 // BSD-style license that can be found in the LICENSE file.
14288 14355
14289 14356
14290 /// @domName HTMLObjectElement; @docsEditable true 14357 /// @domName HTMLObjectElement; @docsEditable true
14358 @SupportedBrowser(SupportedBrowser.CHROME)
14359 @SupportedBrowser(SupportedBrowser.FIREFOX)
14360 @SupportedBrowser(SupportedBrowser.SAFARI)
14291 class ObjectElement extends Element native "*HTMLObjectElement" { 14361 class ObjectElement extends Element native "*HTMLObjectElement" {
14292 14362
14293 ///@docsEditable true 14363 ///@docsEditable true
14294 factory ObjectElement() => document.$dom_createElement("object"); 14364 factory ObjectElement() => document.$dom_createElement("object");
14295 14365
14366 /**
14367 * Checks if this type is supported on the current platform
14368 */
14369 static bool get supported => Element.isTagSupported('object');
14370
14296 /// @domName HTMLObjectElement.align; @docsEditable true 14371 /// @domName HTMLObjectElement.align; @docsEditable true
14297 String align; 14372 String align;
14298 14373
14299 /// @domName HTMLObjectElement.archive; @docsEditable true 14374 /// @domName HTMLObjectElement.archive; @docsEditable true
14300 String archive; 14375 String archive;
14301 14376
14302 /// @domName HTMLObjectElement.border; @docsEditable true 14377 /// @domName HTMLObjectElement.border; @docsEditable true
14303 String border; 14378 String border;
14304 14379
14305 /// @domName HTMLObjectElement.code; @docsEditable true 14380 /// @domName HTMLObjectElement.code; @docsEditable true
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
14491 14566
14492 /// @domName HTMLOptionElement.value; @docsEditable true 14567 /// @domName HTMLOptionElement.value; @docsEditable true
14493 String value; 14568 String value;
14494 } 14569 }
14495 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 14570 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
14496 // for details. All rights reserved. Use of this source code is governed by a 14571 // for details. All rights reserved. Use of this source code is governed by a
14497 // BSD-style license that can be found in the LICENSE file. 14572 // BSD-style license that can be found in the LICENSE file.
14498 14573
14499 14574
14500 /// @domName HTMLOutputElement; @docsEditable true 14575 /// @domName HTMLOutputElement; @docsEditable true
14576 @SupportedBrowser(SupportedBrowser.CHROME)
14577 @SupportedBrowser(SupportedBrowser.FIREFOX)
14578 @SupportedBrowser(SupportedBrowser.SAFARI)
14501 class OutputElement extends Element native "*HTMLOutputElement" { 14579 class OutputElement extends Element native "*HTMLOutputElement" {
14502 14580
14503 ///@docsEditable true 14581 ///@docsEditable true
14504 factory OutputElement() => document.$dom_createElement("output"); 14582 factory OutputElement() => document.$dom_createElement("output");
14505 14583
14584 /**
14585 * Checks if this type is supported on the current platform
14586 */
14587 static bool get supported => Element.isTagSupported('output');
14588
14506 /// @domName HTMLOutputElement.defaultValue; @docsEditable true 14589 /// @domName HTMLOutputElement.defaultValue; @docsEditable true
14507 String defaultValue; 14590 String defaultValue;
14508 14591
14509 /// @domName HTMLOutputElement.form; @docsEditable true 14592 /// @domName HTMLOutputElement.form; @docsEditable true
14510 final FormElement form; 14593 final FormElement form;
14511 14594
14512 /// @domName HTMLOutputElement.htmlFor; @docsEditable true 14595 /// @domName HTMLOutputElement.htmlFor; @docsEditable true
14513 DomSettableTokenList htmlFor; 14596 DomSettableTokenList htmlFor;
14514 14597
14515 /// @domName HTMLOutputElement.labels; @docsEditable true 14598 /// @domName HTMLOutputElement.labels; @docsEditable true
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
14845 14928
14846 /// @domName ProcessingInstruction.target; @docsEditable true 14929 /// @domName ProcessingInstruction.target; @docsEditable true
14847 final String target; 14930 final String target;
14848 } 14931 }
14849 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 14932 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
14850 // for details. All rights reserved. Use of this source code is governed by a 14933 // for details. All rights reserved. Use of this source code is governed by a
14851 // BSD-style license that can be found in the LICENSE file. 14934 // BSD-style license that can be found in the LICENSE file.
14852 14935
14853 14936
14854 /// @domName HTMLProgressElement; @docsEditable true 14937 /// @domName HTMLProgressElement; @docsEditable true
14938 @SupportedBrowser(SupportedBrowser.CHROME)
14939 @SupportedBrowser(SupportedBrowser.FIREFOX)
14940 @SupportedBrowser(SupportedBrowser.IE, '10')
14941 @SupportedBrowser(SupportedBrowser.SAFARI)
14855 class ProgressElement extends Element native "*HTMLProgressElement" { 14942 class ProgressElement extends Element native "*HTMLProgressElement" {
14856 14943
14857 ///@docsEditable true 14944 ///@docsEditable true
14858 factory ProgressElement() => document.$dom_createElement("progress"); 14945 factory ProgressElement() => document.$dom_createElement("progress");
14859 14946
14947 /**
14948 * Checks if this type is supported on the current platform
14949 */
14950 static bool get supported => Element.isTagSupported('progress');
14951
14860 /// @domName HTMLProgressElement.labels; @docsEditable true 14952 /// @domName HTMLProgressElement.labels; @docsEditable true
14861 @Returns('NodeList') @Creates('NodeList') 14953 @Returns('NodeList') @Creates('NodeList')
14862 final List<Node> labels; 14954 final List<Node> labels;
14863 14955
14864 /// @domName HTMLProgressElement.max; @docsEditable true 14956 /// @domName HTMLProgressElement.max; @docsEditable true
14865 num max; 14957 num max;
14866 14958
14867 /// @domName HTMLProgressElement.position; @docsEditable true 14959 /// @domName HTMLProgressElement.position; @docsEditable true
14868 final num position; 14960 final num position;
14869 14961
(...skipping 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after
17810 17902
17811 /// @domName TouchList.item; @docsEditable true 17903 /// @domName TouchList.item; @docsEditable true
17812 Touch item(int index) native; 17904 Touch item(int index) native;
17813 } 17905 }
17814 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 17906 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
17815 // for details. All rights reserved. Use of this source code is governed by a 17907 // for details. All rights reserved. Use of this source code is governed by a
17816 // BSD-style license that can be found in the LICENSE file. 17908 // BSD-style license that can be found in the LICENSE file.
17817 17909
17818 17910
17819 /// @domName HTMLTrackElement; @docsEditable true 17911 /// @domName HTMLTrackElement; @docsEditable true
17912 @SupportedBrowser(SupportedBrowser.CHROME)
17913 @SupportedBrowser(SupportedBrowser.IE, '10')
17914 @SupportedBrowser(SupportedBrowser.SAFARI)
17820 class TrackElement extends Element native "*HTMLTrackElement" { 17915 class TrackElement extends Element native "*HTMLTrackElement" {
17821 17916
17822 ///@docsEditable true 17917 ///@docsEditable true
17823 factory TrackElement() => document.$dom_createElement("track"); 17918 factory TrackElement() => document.$dom_createElement("track");
17824 17919
17920 /**
17921 * Checks if this type is supported on the current platform
17922 */
17923 static bool get supported => Element.isTagSupported('track');
17924
17825 static const int ERROR = 3; 17925 static const int ERROR = 3;
17826 17926
17827 static const int LOADED = 2; 17927 static const int LOADED = 2;
17828 17928
17829 static const int LOADING = 1; 17929 static const int LOADING = 1;
17830 17930
17831 static const int NONE = 0; 17931 static const int NONE = 0;
17832 17932
17833 /// @domName HTMLTrackElement.defaultValue; @docsEditable true 17933 /// @domName HTMLTrackElement.defaultValue; @docsEditable true
17834 @JSName('default') 17934 @JSName('default')
(...skipping 7460 matching lines...) Expand 10 before | Expand all | Expand 10 after
25295 T next() { 25395 T next() {
25296 if (!hasNext) { 25396 if (!hasNext) {
25297 throw new StateError("No more elements"); 25397 throw new StateError("No more elements");
25298 } 25398 }
25299 return _array[_pos++]; 25399 return _array[_pos++];
25300 } 25400 }
25301 25401
25302 final List<T> _array; 25402 final List<T> _array;
25303 int _pos; 25403 int _pos;
25304 } 25404 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/scripts/systemhtml.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698