OLD | NEW |
1 #library('html'); | 1 #library('html'); |
2 | 2 |
3 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 // DO NOT EDIT | 7 // DO NOT EDIT |
8 // Auto-generated dart:html library. | 8 // Auto-generated dart:html library. |
9 | 9 |
10 | 10 |
(...skipping 5399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5410 () => new _ElementRectImpl(this), | 5410 () => new _ElementRectImpl(this), |
5411 new Completer<ElementRect>()); | 5411 new Completer<ElementRect>()); |
5412 } | 5412 } |
5413 | 5413 |
5414 Future<CSSStyleDeclaration> get computedStyle() { | 5414 Future<CSSStyleDeclaration> get computedStyle() { |
5415 // TODO(jacobr): last param should be null, see b/5045788 | 5415 // TODO(jacobr): last param should be null, see b/5045788 |
5416 return getComputedStyle(''); | 5416 return getComputedStyle(''); |
5417 } | 5417 } |
5418 | 5418 |
5419 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) { | 5419 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) { |
5420 return _createMeasurementFuture(() => | 5420 return _createMeasurementFuture( |
5421 window._getComputedStyle(this, pseudoElement), | 5421 () => _window._getComputedStyle(this, pseudoElement), |
5422 new Completer<CSSStyleDeclaration>()); | 5422 new Completer<CSSStyleDeclaration>()); |
5423 } | 5423 } |
5424 | 5424 |
5425 _ElementEventsImpl get on() => | 5425 _ElementEventsImpl get on() => |
5426 new _ElementEventsImpl(this); | 5426 new _ElementEventsImpl(this); |
5427 | 5427 |
5428 static final int ALLOW_KEYBOARD_INPUT = 1; | 5428 static final int ALLOW_KEYBOARD_INPUT = 1; |
5429 | 5429 |
5430 int get _childElementCount() native "return this.childElementCount;"; | 5430 int get _childElementCount() native "return this.childElementCount;"; |
5431 | 5431 |
(...skipping 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8247 List copy = new List.from(value); | 8247 List copy = new List.from(value); |
8248 text = ''; | 8248 text = ''; |
8249 for (Node node in copy) { | 8249 for (Node node in copy) { |
8250 _appendChild(node); | 8250 _appendChild(node); |
8251 } | 8251 } |
8252 } | 8252 } |
8253 | 8253 |
8254 // TODO(jacobr): should we throw an exception if parent is already null? | 8254 // TODO(jacobr): should we throw an exception if parent is already null? |
8255 _NodeImpl remove() { | 8255 _NodeImpl remove() { |
8256 if (this.parent != null) { | 8256 if (this.parent != null) { |
8257 this.parent._removeChild(this); | 8257 final _NodeImpl parent = this.parent; |
| 8258 parent._removeChild(this); |
8258 } | 8259 } |
8259 return this; | 8260 return this; |
8260 } | 8261 } |
8261 | 8262 |
8262 _NodeImpl replaceWith(Node otherNode) { | 8263 _NodeImpl replaceWith(Node otherNode) { |
8263 try { | 8264 try { |
8264 this.parent._replaceChild(otherNode, this); | 8265 final _NodeImpl parent = this.parent; |
| 8266 parent._replaceChild(otherNode, this); |
8265 } catch(var e) { | 8267 } catch(var e) { |
8266 | 8268 |
8267 }; | 8269 }; |
8268 return this; | 8270 return this; |
8269 } | 8271 } |
8270 | 8272 |
8271 | 8273 |
8272 static final int ATTRIBUTE_NODE = 2; | 8274 static final int ATTRIBUTE_NODE = 2; |
8273 | 8275 |
8274 static final int CDATA_SECTION_NODE = 4; | 8276 static final int CDATA_SECTION_NODE = 4; |
(...skipping 7453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15728 } | 15730 } |
15729 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 15731 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
15730 // for details. All rights reserved. Use of this source code is governed by a | 15732 // for details. All rights reserved. Use of this source code is governed by a |
15731 // BSD-style license that can be found in the LICENSE file. | 15733 // BSD-style license that can be found in the LICENSE file. |
15732 | 15734 |
15733 // WARNING: Do not edit - generated code. | 15735 // WARNING: Do not edit - generated code. |
15734 | 15736 |
15735 interface AbstractWorker extends EventTarget { | 15737 interface AbstractWorker extends EventTarget { |
15736 | 15738 |
15737 AbstractWorkerEvents get on(); | 15739 AbstractWorkerEvents get on(); |
15738 | |
15739 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
15740 | |
15741 bool _dispatchEvent(Event evt); | |
15742 | |
15743 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
15744 } | 15740 } |
15745 | 15741 |
15746 interface AbstractWorkerEvents extends Events { | 15742 interface AbstractWorkerEvents extends Events { |
15747 | 15743 |
15748 EventListenerList get error(); | 15744 EventListenerList get error(); |
15749 } | 15745 } |
15750 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 15746 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
15751 // for details. All rights reserved. Use of this source code is governed by a | 15747 // for details. All rights reserved. Use of this source code is governed by a |
15752 // BSD-style license that can be found in the LICENSE file. | 15748 // BSD-style license that can be found in the LICENSE file. |
15753 | 15749 |
(...skipping 3484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19238 static final int OBSOLETE = 5; | 19234 static final int OBSOLETE = 5; |
19239 | 19235 |
19240 static final int UNCACHED = 0; | 19236 static final int UNCACHED = 0; |
19241 | 19237 |
19242 static final int UPDATEREADY = 4; | 19238 static final int UPDATEREADY = 4; |
19243 | 19239 |
19244 final int status; | 19240 final int status; |
19245 | 19241 |
19246 void abort(); | 19242 void abort(); |
19247 | 19243 |
19248 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
19249 | |
19250 bool _dispatchEvent(Event evt); | |
19251 | |
19252 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
19253 | |
19254 void swapCache(); | 19244 void swapCache(); |
19255 | 19245 |
19256 void update(); | 19246 void update(); |
19257 } | 19247 } |
19258 | 19248 |
19259 interface DOMApplicationCacheEvents extends Events { | 19249 interface DOMApplicationCacheEvents extends Events { |
19260 | 19250 |
19261 EventListenerList get cached(); | 19251 EventListenerList get cached(); |
19262 | 19252 |
19263 EventListenerList get checking(); | 19253 EventListenerList get checking(); |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19869 final bool webkitIsFullScreen; | 19859 final bool webkitIsFullScreen; |
19870 | 19860 |
19871 final String webkitVisibilityState; | 19861 final String webkitVisibilityState; |
19872 | 19862 |
19873 Range caretRangeFromPoint(int x, int y); | 19863 Range caretRangeFromPoint(int x, int y); |
19874 | 19864 |
19875 CDATASection createCDATASection(String data); | 19865 CDATASection createCDATASection(String data); |
19876 | 19866 |
19877 DocumentFragment createDocumentFragment(); | 19867 DocumentFragment createDocumentFragment(); |
19878 | 19868 |
19879 Element _createElement(String tagName); | |
19880 | |
19881 Event _createEvent(String eventType); | |
19882 | |
19883 Range createRange(); | 19869 Range createRange(); |
19884 | 19870 |
19885 Text _createTextNode(String data); | |
19886 | |
19887 Touch createTouch(Window window, EventTarget target, int identifier, int pageX
, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num
webkitRotationAngle, num webkitForce); | 19871 Touch createTouch(Window window, EventTarget target, int identifier, int pageX
, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num
webkitRotationAngle, num webkitForce); |
19888 | 19872 |
19889 TouchList _createTouchList(); | |
19890 | |
19891 Element elementFromPoint(int x, int y); | 19873 Element elementFromPoint(int x, int y); |
19892 | 19874 |
19893 bool execCommand(String command, bool userInterface, String value); | 19875 bool execCommand(String command, bool userInterface, String value); |
19894 | 19876 |
19895 CanvasRenderingContext getCSSCanvasContext(String contextId, String name, int
width, int height); | 19877 CanvasRenderingContext getCSSCanvasContext(String contextId, String name, int
width, int height); |
19896 | 19878 |
19897 bool queryCommandEnabled(String command); | 19879 bool queryCommandEnabled(String command); |
19898 | 19880 |
19899 bool queryCommandIndeterm(String command); | 19881 bool queryCommandIndeterm(String command); |
19900 | 19882 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20010 // for details. All rights reserved. Use of this source code is governed by a | 19992 // for details. All rights reserved. Use of this source code is governed by a |
20011 // BSD-style license that can be found in the LICENSE file. | 19993 // BSD-style license that can be found in the LICENSE file. |
20012 | 19994 |
20013 // WARNING: Do not edit - generated code. | 19995 // WARNING: Do not edit - generated code. |
20014 | 19996 |
20015 interface DocumentFragment extends Node, NodeSelector { | 19997 interface DocumentFragment extends Node, NodeSelector { |
20016 | 19998 |
20017 ElementEvents get on(); | 19999 ElementEvents get on(); |
20018 | 20000 |
20019 Element query(String selectors); | 20001 Element query(String selectors); |
20020 | |
20021 NodeList _querySelectorAll(String selectors); | |
20022 } | 20002 } |
20023 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 20003 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
20024 // for details. All rights reserved. Use of this source code is governed by a | 20004 // for details. All rights reserved. Use of this source code is governed by a |
20025 // BSD-style license that can be found in the LICENSE file. | 20005 // BSD-style license that can be found in the LICENSE file. |
20026 | 20006 |
20027 // WARNING: Do not edit - generated code. | 20007 // WARNING: Do not edit - generated code. |
20028 | 20008 |
20029 interface DocumentType extends Node { | 20009 interface DocumentType extends Node { |
20030 | 20010 |
20031 final NamedNodeMap entities; | 20011 final NamedNodeMap entities; |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20352 | 20332 |
20353 Element clone(bool deep); | 20333 Element clone(bool deep); |
20354 | 20334 |
20355 Element get parent(); | 20335 Element get parent(); |
20356 | 20336 |
20357 | 20337 |
20358 ElementEvents get on(); | 20338 ElementEvents get on(); |
20359 | 20339 |
20360 static final int ALLOW_KEYBOARD_INPUT = 1; | 20340 static final int ALLOW_KEYBOARD_INPUT = 1; |
20361 | 20341 |
20362 final int _childElementCount; | |
20363 | |
20364 final HTMLCollection _children; | |
20365 | |
20366 String _className; | |
20367 | |
20368 final int _clientHeight; | |
20369 | |
20370 final int _clientLeft; | |
20371 | |
20372 final int _clientTop; | |
20373 | |
20374 final int _clientWidth; | |
20375 | |
20376 String contentEditable; | 20342 String contentEditable; |
20377 | 20343 |
20378 String dir; | 20344 String dir; |
20379 | 20345 |
20380 bool draggable; | 20346 bool draggable; |
20381 | 20347 |
20382 final Element _firstElementChild; | |
20383 | |
20384 bool hidden; | 20348 bool hidden; |
20385 | 20349 |
20386 String id; | 20350 String id; |
20387 | 20351 |
20388 String innerHTML; | 20352 String innerHTML; |
20389 | 20353 |
20390 final bool isContentEditable; | 20354 final bool isContentEditable; |
20391 | 20355 |
20392 String lang; | 20356 String lang; |
20393 | 20357 |
20394 final Element lastElementChild; | 20358 final Element lastElementChild; |
20395 | 20359 |
20396 final Element nextElementSibling; | 20360 final Element nextElementSibling; |
20397 | 20361 |
20398 final int _offsetHeight; | |
20399 | |
20400 final int _offsetLeft; | |
20401 | |
20402 final Element offsetParent; | 20362 final Element offsetParent; |
20403 | 20363 |
20404 final int _offsetTop; | |
20405 | |
20406 final int _offsetWidth; | |
20407 | |
20408 final String outerHTML; | 20364 final String outerHTML; |
20409 | 20365 |
20410 final Element previousElementSibling; | 20366 final Element previousElementSibling; |
20411 | 20367 |
20412 final int _scrollHeight; | |
20413 | |
20414 int _scrollLeft; | |
20415 | |
20416 int _scrollTop; | |
20417 | |
20418 final int _scrollWidth; | |
20419 | |
20420 bool spellcheck; | 20368 bool spellcheck; |
20421 | 20369 |
20422 final CSSStyleDeclaration style; | 20370 final CSSStyleDeclaration style; |
20423 | 20371 |
20424 int tabIndex; | 20372 int tabIndex; |
20425 | 20373 |
20426 final String tagName; | 20374 final String tagName; |
20427 | 20375 |
20428 String title; | 20376 String title; |
20429 | 20377 |
20430 bool translate; | 20378 bool translate; |
20431 | 20379 |
20432 final String webkitRegionOverflow; | 20380 final String webkitRegionOverflow; |
20433 | 20381 |
20434 String webkitdropzone; | 20382 String webkitdropzone; |
20435 | 20383 |
20436 void blur(); | 20384 void blur(); |
20437 | 20385 |
20438 void click(); | 20386 void click(); |
20439 | 20387 |
20440 void focus(); | 20388 void focus(); |
20441 | 20389 |
20442 String _getAttribute(String name); | |
20443 | |
20444 ClientRect _getBoundingClientRect(); | |
20445 | |
20446 ClientRectList _getClientRects(); | |
20447 | |
20448 bool _hasAttribute(String name); | |
20449 | |
20450 Element insertAdjacentElement(String where, Element element); | 20390 Element insertAdjacentElement(String where, Element element); |
20451 | 20391 |
20452 void insertAdjacentHTML(String where, String html); | 20392 void insertAdjacentHTML(String where, String html); |
20453 | 20393 |
20454 void insertAdjacentText(String where, String text); | 20394 void insertAdjacentText(String where, String text); |
20455 | 20395 |
20456 Element query(String selectors); | 20396 Element query(String selectors); |
20457 | 20397 |
20458 NodeList _querySelectorAll(String selectors); | |
20459 | |
20460 void _removeAttribute(String name); | |
20461 | |
20462 void scrollByLines(int lines); | 20398 void scrollByLines(int lines); |
20463 | 20399 |
20464 void scrollByPages(int pages); | 20400 void scrollByPages(int pages); |
20465 | 20401 |
20466 void scrollIntoView([bool centerIfNeeded]); | 20402 void scrollIntoView([bool centerIfNeeded]); |
20467 | 20403 |
20468 void _setAttribute(String name, String value); | |
20469 | |
20470 bool matchesSelector(String selectors); | 20404 bool matchesSelector(String selectors); |
20471 | 20405 |
20472 void webkitRequestFullScreen(int flags); | 20406 void webkitRequestFullScreen(int flags); |
20473 | 20407 |
20474 } | 20408 } |
20475 | 20409 |
20476 interface ElementEvents extends Events { | 20410 interface ElementEvents extends Events { |
20477 | 20411 |
20478 EventListenerList get abort(); | 20412 EventListenerList get abort(); |
20479 | 20413 |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20835 bool returnValue; | 20769 bool returnValue; |
20836 | 20770 |
20837 final EventTarget srcElement; | 20771 final EventTarget srcElement; |
20838 | 20772 |
20839 final EventTarget target; | 20773 final EventTarget target; |
20840 | 20774 |
20841 final int timeStamp; | 20775 final int timeStamp; |
20842 | 20776 |
20843 final String type; | 20777 final String type; |
20844 | 20778 |
20845 void _initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg); | |
20846 | |
20847 void preventDefault(); | 20779 void preventDefault(); |
20848 | 20780 |
20849 void stopImmediatePropagation(); | 20781 void stopImmediatePropagation(); |
20850 | 20782 |
20851 void stopPropagation(); | 20783 void stopPropagation(); |
20852 } | 20784 } |
20853 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 20785 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
20854 // for details. All rights reserved. Use of this source code is governed by a | 20786 // for details. All rights reserved. Use of this source code is governed by a |
20855 // BSD-style license that can be found in the LICENSE file. | 20787 // BSD-style license that can be found in the LICENSE file. |
20856 | 20788 |
(...skipping 30 matching lines...) Expand all Loading... |
20887 static final int CONNECTING = 0; | 20819 static final int CONNECTING = 0; |
20888 | 20820 |
20889 static final int OPEN = 1; | 20821 static final int OPEN = 1; |
20890 | 20822 |
20891 final String URL; | 20823 final String URL; |
20892 | 20824 |
20893 final int readyState; | 20825 final int readyState; |
20894 | 20826 |
20895 final String url; | 20827 final String url; |
20896 | 20828 |
20897 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
20898 | |
20899 void close(); | 20829 void close(); |
20900 | |
20901 bool _dispatchEvent(Event evt); | |
20902 | |
20903 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
20904 } | 20830 } |
20905 | 20831 |
20906 interface EventSourceEvents extends Events { | 20832 interface EventSourceEvents extends Events { |
20907 | 20833 |
20908 EventListenerList get error(); | 20834 EventListenerList get error(); |
20909 | 20835 |
20910 EventListenerList get message(); | 20836 EventListenerList get message(); |
20911 | 20837 |
20912 EventListenerList get open(); | 20838 EventListenerList get open(); |
20913 } | 20839 } |
(...skipping 12 matching lines...) Expand all Loading... |
20926 } | 20852 } |
20927 | 20853 |
20928 interface Events { | 20854 interface Events { |
20929 EventListenerList operator [](String type); | 20855 EventListenerList operator [](String type); |
20930 } | 20856 } |
20931 | 20857 |
20932 interface EventTarget { | 20858 interface EventTarget { |
20933 | 20859 |
20934 final Events on; | 20860 final Events on; |
20935 | 20861 |
20936 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
20937 | |
20938 bool _dispatchEvent(Event event); | |
20939 | |
20940 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
20941 | |
20942 } | 20862 } |
20943 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 20863 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
20944 // for details. All rights reserved. Use of this source code is governed by a | 20864 // for details. All rights reserved. Use of this source code is governed by a |
20945 // BSD-style license that can be found in the LICENSE file. | 20865 // BSD-style license that can be found in the LICENSE file. |
20946 | 20866 |
20947 // WARNING: Do not edit - generated code. | 20867 // WARNING: Do not edit - generated code. |
20948 | 20868 |
20949 interface FieldSetElement extends Element { | 20869 interface FieldSetElement extends Element { |
20950 | 20870 |
20951 final FormElement form; | 20871 final FormElement form; |
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22838 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22758 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
22839 // for details. All rights reserved. Use of this source code is governed by a | 22759 // for details. All rights reserved. Use of this source code is governed by a |
22840 // BSD-style license that can be found in the LICENSE file. | 22760 // BSD-style license that can be found in the LICENSE file. |
22841 | 22761 |
22842 // WARNING: Do not edit - generated code. | 22762 // WARNING: Do not edit - generated code. |
22843 | 22763 |
22844 interface MessagePort extends EventTarget { | 22764 interface MessagePort extends EventTarget { |
22845 | 22765 |
22846 MessagePortEvents get on(); | 22766 MessagePortEvents get on(); |
22847 | 22767 |
22848 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
22849 | |
22850 void close(); | 22768 void close(); |
22851 | 22769 |
22852 bool _dispatchEvent(Event evt); | |
22853 | |
22854 void postMessage(String message, [List messagePorts]); | 22770 void postMessage(String message, [List messagePorts]); |
22855 | 22771 |
22856 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
22857 | |
22858 void start(); | 22772 void start(); |
22859 | 22773 |
22860 void webkitPostMessage(String message, [List transfer]); | 22774 void webkitPostMessage(String message, [List transfer]); |
22861 } | 22775 } |
22862 | 22776 |
22863 interface MessagePortEvents extends Events { | 22777 interface MessagePortEvents extends Events { |
22864 | 22778 |
22865 EventListenerList get message(); | 22779 EventListenerList get message(); |
22866 } | 22780 } |
22867 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22781 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22975 | 22889 |
22976 final int screenY; | 22890 final int screenY; |
22977 | 22891 |
22978 final bool shiftKey; | 22892 final bool shiftKey; |
22979 | 22893 |
22980 final Node toElement; | 22894 final Node toElement; |
22981 | 22895 |
22982 final int x; | 22896 final int x; |
22983 | 22897 |
22984 final int y; | 22898 final int y; |
22985 | |
22986 void _initMouseEvent(String type, bool canBubble, bool cancelable, Window view
, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey,
bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget)
; | |
22987 } | 22899 } |
22988 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 22900 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
22989 // for details. All rights reserved. Use of this source code is governed by a | 22901 // for details. All rights reserved. Use of this source code is governed by a |
22990 // BSD-style license that can be found in the LICENSE file. | 22902 // BSD-style license that can be found in the LICENSE file. |
22991 | 22903 |
22992 // WARNING: Do not edit - generated code. | 22904 // WARNING: Do not edit - generated code. |
22993 | 22905 |
22994 interface MutationEvent extends Event { | 22906 interface MutationEvent extends Event { |
22995 | 22907 |
22996 static final int ADDITION = 2; | 22908 static final int ADDITION = 2; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23152 static final int ENTITY_NODE = 6; | 23064 static final int ENTITY_NODE = 6; |
23153 | 23065 |
23154 static final int ENTITY_REFERENCE_NODE = 5; | 23066 static final int ENTITY_REFERENCE_NODE = 5; |
23155 | 23067 |
23156 static final int NOTATION_NODE = 12; | 23068 static final int NOTATION_NODE = 12; |
23157 | 23069 |
23158 static final int PROCESSING_INSTRUCTION_NODE = 7; | 23070 static final int PROCESSING_INSTRUCTION_NODE = 7; |
23159 | 23071 |
23160 static final int TEXT_NODE = 3; | 23072 static final int TEXT_NODE = 3; |
23161 | 23073 |
23162 final NamedNodeMap _attributes; | |
23163 | |
23164 final NodeList _childNodes; | |
23165 | |
23166 final Node nextNode; | 23074 final Node nextNode; |
23167 | 23075 |
23168 final Document document; | 23076 final Document document; |
23169 | 23077 |
23170 final Node parent; | 23078 final Node parent; |
23171 | 23079 |
23172 final Node previousNode; | 23080 final Node previousNode; |
23173 | 23081 |
23174 String text; | 23082 String text; |
23175 | 23083 |
23176 Node _appendChild(Node newChild); | |
23177 | |
23178 Node clone(bool deep); | 23084 Node clone(bool deep); |
23179 | 23085 |
23180 bool contains(Node other); | 23086 bool contains(Node other); |
23181 | 23087 |
23182 bool hasChildNodes(); | 23088 bool hasChildNodes(); |
23183 | 23089 |
23184 Node insertBefore(Node newChild, Node refChild); | 23090 Node insertBefore(Node newChild, Node refChild); |
23185 | 23091 |
23186 Node _removeChild(Node oldChild); | |
23187 | |
23188 Node _replaceChild(Node newChild, Node oldChild); | |
23189 | |
23190 } | 23092 } |
23191 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 23093 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
23192 // for details. All rights reserved. Use of this source code is governed by a | 23094 // for details. All rights reserved. Use of this source code is governed by a |
23193 // BSD-style license that can be found in the LICENSE file. | 23095 // BSD-style license that can be found in the LICENSE file. |
23194 | 23096 |
23195 // WARNING: Do not edit - generated code. | 23097 // WARNING: Do not edit - generated code. |
23196 | 23098 |
23197 interface NodeFilter { | 23099 interface NodeFilter { |
23198 | 23100 |
23199 static final int FILTER_ACCEPT = 1; | 23101 static final int FILTER_ACCEPT = 1; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23281 // WARNING: Do not edit - generated code. | 23183 // WARNING: Do not edit - generated code. |
23282 | 23184 |
23283 interface NodeSelector { | 23185 interface NodeSelector { |
23284 | 23186 |
23285 // TODO(nweiz): add this back once DocumentFragment is ported. | 23187 // TODO(nweiz): add this back once DocumentFragment is ported. |
23286 // ElementList queryAll(String selectors); | 23188 // ElementList queryAll(String selectors); |
23287 | 23189 |
23288 | 23190 |
23289 Element query(String selectors); | 23191 Element query(String selectors); |
23290 | 23192 |
23291 NodeList _querySelectorAll(String selectors); | |
23292 | |
23293 } | 23193 } |
23294 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 23194 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
23295 // for details. All rights reserved. Use of this source code is governed by a | 23195 // for details. All rights reserved. Use of this source code is governed by a |
23296 // BSD-style license that can be found in the LICENSE file. | 23196 // BSD-style license that can be found in the LICENSE file. |
23297 | 23197 |
23298 // WARNING: Do not edit - generated code. | 23198 // WARNING: Do not edit - generated code. |
23299 | 23199 |
23300 interface Notation extends Node { | 23200 interface Notation extends Node { |
23301 | 23201 |
23302 final String publicId; | 23202 final String publicId; |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
24542 } | 24442 } |
24543 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 24443 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
24544 // for details. All rights reserved. Use of this source code is governed by a | 24444 // for details. All rights reserved. Use of this source code is governed by a |
24545 // BSD-style license that can be found in the LICENSE file. | 24445 // BSD-style license that can be found in the LICENSE file. |
24546 | 24446 |
24547 // WARNING: Do not edit - generated code. | 24447 // WARNING: Do not edit - generated code. |
24548 | 24448 |
24549 interface SVGDocument extends Document { | 24449 interface SVGDocument extends Document { |
24550 | 24450 |
24551 final SVGSVGElement rootElement; | 24451 final SVGSVGElement rootElement; |
24552 | |
24553 Event _createEvent(String eventType); | |
24554 } | 24452 } |
24555 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 24453 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
24556 // for details. All rights reserved. Use of this source code is governed by a | 24454 // for details. All rights reserved. Use of this source code is governed by a |
24557 // BSD-style license that can be found in the LICENSE file. | 24455 // BSD-style license that can be found in the LICENSE file. |
24558 | 24456 |
24559 // WARNING: Do not edit - generated code. | 24457 // WARNING: Do not edit - generated code. |
24560 | 24458 |
24561 interface SVGElement extends Element { | 24459 interface SVGElement extends Element { |
24562 | 24460 |
24563 String id; | 24461 String id; |
(...skipping 22 matching lines...) Expand all Loading... |
24586 | 24484 |
24587 final SVGElementInstance firstChild; | 24485 final SVGElementInstance firstChild; |
24588 | 24486 |
24589 final SVGElementInstance lastChild; | 24487 final SVGElementInstance lastChild; |
24590 | 24488 |
24591 final SVGElementInstance nextSibling; | 24489 final SVGElementInstance nextSibling; |
24592 | 24490 |
24593 final SVGElementInstance parentNode; | 24491 final SVGElementInstance parentNode; |
24594 | 24492 |
24595 final SVGElementInstance previousSibling; | 24493 final SVGElementInstance previousSibling; |
24596 | |
24597 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
24598 | |
24599 bool _dispatchEvent(Event event); | |
24600 | |
24601 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
24602 } | 24494 } |
24603 | 24495 |
24604 interface SVGElementInstanceEvents extends Events { | 24496 interface SVGElementInstanceEvents extends Events { |
24605 | 24497 |
24606 EventListenerList get abort(); | 24498 EventListenerList get abort(); |
24607 | 24499 |
24608 EventListenerList get beforeCopy(); | 24500 EventListenerList get beforeCopy(); |
24609 | 24501 |
24610 EventListenerList get beforeCut(); | 24502 EventListenerList get beforeCut(); |
24611 | 24503 |
(...skipping 1830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
26442 String replaceItem(String item, int index); | 26334 String replaceItem(String item, int index); |
26443 } | 26335 } |
26444 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 26336 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
26445 // for details. All rights reserved. Use of this source code is governed by a | 26337 // for details. All rights reserved. Use of this source code is governed by a |
26446 // BSD-style license that can be found in the LICENSE file. | 26338 // BSD-style license that can be found in the LICENSE file. |
26447 | 26339 |
26448 // WARNING: Do not edit - generated code. | 26340 // WARNING: Do not edit - generated code. |
26449 | 26341 |
26450 interface SVGStylable { | 26342 interface SVGStylable { |
26451 | 26343 |
26452 final SVGAnimatedString _svgClassName; | |
26453 | |
26454 final CSSStyleDeclaration style; | 26344 final CSSStyleDeclaration style; |
26455 | 26345 |
26456 CSSValue getPresentationAttribute(String name); | 26346 CSSValue getPresentationAttribute(String name); |
26457 } | 26347 } |
26458 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 26348 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
26459 // for details. All rights reserved. Use of this source code is governed by a | 26349 // for details. All rights reserved. Use of this source code is governed by a |
26460 // BSD-style license that can be found in the LICENSE file. | 26350 // BSD-style license that can be found in the LICENSE file. |
26461 | 26351 |
26462 // WARNING: Do not edit - generated code. | 26352 // WARNING: Do not edit - generated code. |
26463 | 26353 |
(...skipping 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
29058 final int bufferedAmount; | 28948 final int bufferedAmount; |
29059 | 28949 |
29060 final String extensions; | 28950 final String extensions; |
29061 | 28951 |
29062 final String protocol; | 28952 final String protocol; |
29063 | 28953 |
29064 final int readyState; | 28954 final int readyState; |
29065 | 28955 |
29066 final String url; | 28956 final String url; |
29067 | 28957 |
29068 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
29069 | |
29070 void close([int code, String reason]); | 28958 void close([int code, String reason]); |
29071 | 28959 |
29072 bool _dispatchEvent(Event evt); | |
29073 | |
29074 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
29075 | |
29076 bool send(String data); | 28960 bool send(String data); |
29077 } | 28961 } |
29078 | 28962 |
29079 interface WebSocketEvents extends Events { | 28963 interface WebSocketEvents extends Events { |
29080 | 28964 |
29081 EventListenerList get close(); | 28965 EventListenerList get close(); |
29082 | 28966 |
29083 EventListenerList get error(); | 28967 EventListenerList get error(); |
29084 | 28968 |
29085 EventListenerList get message(); | 28969 EventListenerList get message(); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
29243 final Window top; | 29127 final Window top; |
29244 | 29128 |
29245 final IDBFactory webkitIndexedDB; | 29129 final IDBFactory webkitIndexedDB; |
29246 | 29130 |
29247 final NotificationCenter webkitNotifications; | 29131 final NotificationCenter webkitNotifications; |
29248 | 29132 |
29249 final StorageInfo webkitStorageInfo; | 29133 final StorageInfo webkitStorageInfo; |
29250 | 29134 |
29251 final Window window; | 29135 final Window window; |
29252 | 29136 |
29253 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
29254 | |
29255 void alert(String message); | 29137 void alert(String message); |
29256 | 29138 |
29257 String atob(String string); | 29139 String atob(String string); |
29258 | 29140 |
29259 void blur(); | 29141 void blur(); |
29260 | 29142 |
29261 String btoa(String string); | 29143 String btoa(String string); |
29262 | 29144 |
29263 void captureEvents(); | 29145 void captureEvents(); |
29264 | 29146 |
29265 void clearInterval(int handle); | 29147 void clearInterval(int handle); |
29266 | 29148 |
29267 void clearTimeout(int handle); | 29149 void clearTimeout(int handle); |
29268 | 29150 |
29269 void close(); | 29151 void close(); |
29270 | 29152 |
29271 bool confirm(String message); | 29153 bool confirm(String message); |
29272 | 29154 |
29273 bool _dispatchEvent(Event evt); | |
29274 | |
29275 bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool w
holeWord, bool searchInFrames, bool showDialog); | 29155 bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool w
holeWord, bool searchInFrames, bool showDialog); |
29276 | 29156 |
29277 void focus(); | 29157 void focus(); |
29278 | 29158 |
29279 CSSStyleDeclaration _getComputedStyle(Element element, String pseudoElement); | |
29280 | |
29281 CSSRuleList getMatchedCSSRules(Element element, String pseudoElement); | 29159 CSSRuleList getMatchedCSSRules(Element element, String pseudoElement); |
29282 | 29160 |
29283 DOMSelection getSelection(); | 29161 DOMSelection getSelection(); |
29284 | 29162 |
29285 MediaQueryList matchMedia(String query); | 29163 MediaQueryList matchMedia(String query); |
29286 | 29164 |
29287 void moveBy(num x, num y); | 29165 void moveBy(num x, num y); |
29288 | 29166 |
29289 void moveTo(num x, num y); | 29167 void moveTo(num x, num y); |
29290 | 29168 |
29291 Window open(String url, String name, [String options]); | 29169 Window open(String url, String name, [String options]); |
29292 | 29170 |
29293 Database openDatabase(String name, String version, String displayName, int est
imatedSize, [DatabaseCallback creationCallback]); | 29171 Database openDatabase(String name, String version, String displayName, int est
imatedSize, [DatabaseCallback creationCallback]); |
29294 | 29172 |
29295 void postMessage(Dynamic message, String targetOrigin, [List messagePorts]); | 29173 void postMessage(Dynamic message, String targetOrigin, [List messagePorts]); |
29296 | 29174 |
29297 void print(); | 29175 void print(); |
29298 | 29176 |
29299 String prompt(String message, String defaultValue); | 29177 String prompt(String message, String defaultValue); |
29300 | 29178 |
29301 void releaseEvents(); | 29179 void releaseEvents(); |
29302 | 29180 |
29303 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
29304 | |
29305 void resizeBy(num x, num y); | 29181 void resizeBy(num x, num y); |
29306 | 29182 |
29307 void resizeTo(num width, num height); | 29183 void resizeTo(num width, num height); |
29308 | 29184 |
29309 void scroll(int x, int y); | 29185 void scroll(int x, int y); |
29310 | 29186 |
29311 void scrollBy(int x, int y); | 29187 void scrollBy(int x, int y); |
29312 | 29188 |
29313 void scrollTo(int x, int y); | 29189 void scrollTo(int x, int y); |
29314 | 29190 |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
29651 final int status; | 29527 final int status; |
29652 | 29528 |
29653 final String statusText; | 29529 final String statusText; |
29654 | 29530 |
29655 final XMLHttpRequestUpload upload; | 29531 final XMLHttpRequestUpload upload; |
29656 | 29532 |
29657 bool withCredentials; | 29533 bool withCredentials; |
29658 | 29534 |
29659 void abort(); | 29535 void abort(); |
29660 | 29536 |
29661 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
29662 | |
29663 bool _dispatchEvent(Event evt); | |
29664 | |
29665 String getAllResponseHeaders(); | 29537 String getAllResponseHeaders(); |
29666 | 29538 |
29667 String getResponseHeader(String header); | 29539 String getResponseHeader(String header); |
29668 | 29540 |
29669 void open(String method, String url, [bool async, String user, String password
]); | 29541 void open(String method, String url, [bool async, String user, String password
]); |
29670 | 29542 |
29671 void overrideMimeType(String override); | 29543 void overrideMimeType(String override); |
29672 | 29544 |
29673 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
29674 | |
29675 void send([var data]); | 29545 void send([var data]); |
29676 | 29546 |
29677 void setRequestHeader(String header, String value); | 29547 void setRequestHeader(String header, String value); |
29678 } | 29548 } |
29679 | 29549 |
29680 interface XMLHttpRequestEvents extends Events { | 29550 interface XMLHttpRequestEvents extends Events { |
29681 | 29551 |
29682 EventListenerList get abort(); | 29552 EventListenerList get abort(); |
29683 | 29553 |
29684 EventListenerList get error(); | 29554 EventListenerList get error(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
29727 } | 29597 } |
29728 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 29598 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
29729 // for details. All rights reserved. Use of this source code is governed by a | 29599 // for details. All rights reserved. Use of this source code is governed by a |
29730 // BSD-style license that can be found in the LICENSE file. | 29600 // BSD-style license that can be found in the LICENSE file. |
29731 | 29601 |
29732 // WARNING: Do not edit - generated code. | 29602 // WARNING: Do not edit - generated code. |
29733 | 29603 |
29734 interface XMLHttpRequestUpload extends EventTarget { | 29604 interface XMLHttpRequestUpload extends EventTarget { |
29735 | 29605 |
29736 XMLHttpRequestUploadEvents get on(); | 29606 XMLHttpRequestUploadEvents get on(); |
29737 | |
29738 void _addEventListener(String type, EventListener listener, [bool useCapture])
; | |
29739 | |
29740 bool _dispatchEvent(Event evt); | |
29741 | |
29742 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e]); | |
29743 } | 29607 } |
29744 | 29608 |
29745 interface XMLHttpRequestUploadEvents extends Events { | 29609 interface XMLHttpRequestUploadEvents extends Events { |
29746 | 29610 |
29747 EventListenerList get abort(); | 29611 EventListenerList get abort(); |
29748 | 29612 |
29749 EventListenerList get error(); | 29613 EventListenerList get error(); |
29750 | 29614 |
29751 EventListenerList get load(); | 29615 EventListenerList get load(); |
29752 | 29616 |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
30668 handler(); | 30532 handler(); |
30669 } | 30533 } |
30670 } | 30534 } |
30671 } | 30535 } |
30672 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 30536 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
30673 // for details. All rights reserved. Use of this source code is governed by a | 30537 // for details. All rights reserved. Use of this source code is governed by a |
30674 // BSD-style license that can be found in the LICENSE file. | 30538 // BSD-style license that can be found in the LICENSE file. |
30675 | 30539 |
30676 class _TextFactoryProvider { | 30540 class _TextFactoryProvider { |
30677 | 30541 |
30678 factory Text(String data) => document._createTextNode(data); | 30542 factory Text(String data) => _document._createTextNode(data); |
30679 } | 30543 } |
30680 | 30544 |
30681 class _EventFactoryProvider { | 30545 class _EventFactoryProvider { |
30682 factory Event(String type, [bool canBubble = true, | 30546 factory Event(String type, [bool canBubble = true, |
30683 bool cancelable = true]) { | 30547 bool cancelable = true]) { |
30684 _EventImpl e = document._createEvent("Event"); | 30548 final _EventImpl e = _document._createEvent("Event"); |
30685 e._initEvent(type, canBubble, cancelable); | 30549 e._initEvent(type, canBubble, cancelable); |
30686 return e; | 30550 return e; |
30687 } | 30551 } |
30688 } | 30552 } |
30689 | 30553 |
30690 class _MouseEventFactoryProvider { | 30554 class _MouseEventFactoryProvider { |
30691 factory MouseEvent(String type, Window view, int detail, | 30555 factory MouseEvent(String type, Window view, int detail, |
30692 int screenX, int screenY, int clientX, int clientY, int button, | 30556 int screenX, int screenY, int clientX, int clientY, int button, |
30693 [bool canBubble = true, bool cancelable = true, bool ctrlKey = false, | 30557 [bool canBubble = true, bool cancelable = true, bool ctrlKey = false, |
30694 bool altKey = false, bool shiftKey = false, bool metaKey = false, | 30558 bool altKey = false, bool shiftKey = false, bool metaKey = false, |
30695 EventTarget relatedTarget = null]) { | 30559 EventTarget relatedTarget = null]) { |
30696 final e = document._createEvent("MouseEvent"); | 30560 final e = _document._createEvent("MouseEvent"); |
30697 e._initMouseEvent(type, canBubble, cancelable, view, detail, | 30561 e._initMouseEvent(type, canBubble, cancelable, view, detail, |
30698 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, | 30562 screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, |
30699 button, relatedTarget); | 30563 button, relatedTarget); |
30700 return e; | 30564 return e; |
30701 } | 30565 } |
30702 } | 30566 } |
30703 | 30567 |
30704 class _CSSStyleDeclarationFactoryProvider { | 30568 class _CSSStyleDeclarationFactoryProvider { |
30705 factory CSSStyleDeclaration.css(String css) { | 30569 factory CSSStyleDeclaration.css(String css) { |
30706 var style = new Element.tag('div').style; | 30570 var style = new Element.tag('div').style; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
30739 // 4) Detatch the created element from its dummy parent. | 30603 // 4) Detatch the created element from its dummy parent. |
30740 String parentTag = 'div'; | 30604 String parentTag = 'div'; |
30741 String tag; | 30605 String tag; |
30742 final match = _START_TAG_REGEXP.firstMatch(html); | 30606 final match = _START_TAG_REGEXP.firstMatch(html); |
30743 if (match !== null) { | 30607 if (match !== null) { |
30744 tag = match.group(1).toLowerCase(); | 30608 tag = match.group(1).toLowerCase(); |
30745 if (_CUSTOM_PARENT_TAG_MAP.containsKey(tag)) { | 30609 if (_CUSTOM_PARENT_TAG_MAP.containsKey(tag)) { |
30746 parentTag = _CUSTOM_PARENT_TAG_MAP[tag]; | 30610 parentTag = _CUSTOM_PARENT_TAG_MAP[tag]; |
30747 } | 30611 } |
30748 } | 30612 } |
30749 // TODO(jacobr): make type dom.HTMLElement when dartium allows it. | 30613 final _ElementImpl temp = new Element.tag(parentTag); |
30750 _ElementImpl temp = document._createElement(parentTag); | |
30751 temp.innerHTML = html; | 30614 temp.innerHTML = html; |
30752 | 30615 |
30753 Element element; | 30616 Element element; |
30754 if (temp.elements.length == 1) { | 30617 if (temp.elements.length == 1) { |
30755 element = temp.elements.first; | 30618 element = temp.elements.first; |
30756 } else if (parentTag == 'html' && temp.elements.length == 2) { | 30619 } else if (parentTag == 'html' && temp.elements.length == 2) { |
30757 // Work around for edge case in WebKit and possibly other browsers where | 30620 // Work around for edge case in WebKit and possibly other browsers where |
30758 // both body and head elements are created even though the inner html | 30621 // both body and head elements are created even though the inner html |
30759 // only contains a head or body element. | 30622 // only contains a head or body element. |
30760 element = temp.elements[tag == 'head' ? 0 : 1]; | 30623 element = temp.elements[tag == 'head' ? 0 : 1]; |
30761 } else { | 30624 } else { |
30762 throw new IllegalArgumentException('HTML had ${temp.elements.length} ' + | 30625 throw new IllegalArgumentException('HTML had ${temp.elements.length} ' + |
30763 'top level elements but 1 expected'); | 30626 'top level elements but 1 expected'); |
30764 } | 30627 } |
30765 element.remove(); | 30628 element.remove(); |
30766 return element; | 30629 return element; |
30767 } | 30630 } |
30768 | 30631 |
30769 /** @domName Document.createElement */ | 30632 /** @domName Document.createElement */ |
30770 factory Element.tag(String tag) { | 30633 factory Element.tag(String tag) => _document._createElement(tag); |
30771 return document._createElement(tag); | |
30772 } | |
30773 } | 30634 } |
30774 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 30635 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
30775 // for details. All rights reserved. Use of this source code is governed by a | 30636 // for details. All rights reserved. Use of this source code is governed by a |
30776 // BSD-style license that can be found in the LICENSE file. | 30637 // BSD-style license that can be found in the LICENSE file. |
30777 | 30638 |
30778 class _AudioContextFactoryProvider { | 30639 class _AudioContextFactoryProvider { |
30779 | 30640 |
30780 factory AudioContext() native ''' | 30641 factory AudioContext() native ''' |
30781 var constructor = window.AudioContext || window.webkitAudioContext; | 30642 var constructor = window.AudioContext || window.webkitAudioContext; |
30782 return new constructor(); | 30643 return new constructor(); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
30841 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 30702 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
30842 // for details. All rights reserved. Use of this source code is governed by a | 30703 // for details. All rights reserved. Use of this source code is governed by a |
30843 // BSD-style license that can be found in the LICENSE file. | 30704 // BSD-style license that can be found in the LICENSE file. |
30844 | 30705 |
30845 // TODO(rnystrom): add a way to supress public classes from DartDoc output. | 30706 // TODO(rnystrom): add a way to supress public classes from DartDoc output. |
30846 /** | 30707 /** |
30847 * This class is intended for testing purposes only. | 30708 * This class is intended for testing purposes only. |
30848 */ | 30709 */ |
30849 class Testing { | 30710 class Testing { |
30850 static void addEventListener(EventTarget target, String type, EventListener li
stener, bool useCapture) { | 30711 static void addEventListener(EventTarget target, String type, EventListener li
stener, bool useCapture) { |
30851 target._addEventListener(type, listener, useCapture); | 30712 final _EventTargetImpl targetImpl = target; |
| 30713 targetImpl._addEventListener(type, listener, useCapture); |
30852 } | 30714 } |
30853 static void removeEventListener(EventTarget target, String type, EventListener
listener, bool useCapture) { | 30715 static void removeEventListener(EventTarget target, String type, EventListener
listener, bool useCapture) { |
30854 target._removeEventListener(type, listener, useCapture); | 30716 final _EventTargetImpl targetImpl = target; |
| 30717 targetImpl._removeEventListener(type, listener, useCapture); |
30855 } | 30718 } |
30856 | 30719 |
30857 }// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 30720 }// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
30858 // for details. All rights reserved. Use of this source code is governed by a | 30721 // for details. All rights reserved. Use of this source code is governed by a |
30859 // BSD-style license that can be found in the LICENSE file. | 30722 // BSD-style license that can be found in the LICENSE file. |
30860 | 30723 |
30861 /** | 30724 /** |
30862 * Utils for device detection. | 30725 * Utils for device detection. |
30863 */ | 30726 */ |
30864 class _Device { | 30727 class _Device { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
30968 if (length < 0) throw new IllegalArgumentException('length'); | 30831 if (length < 0) throw new IllegalArgumentException('length'); |
30969 if (start < 0) throw new IndexOutOfRangeException(start); | 30832 if (start < 0) throw new IndexOutOfRangeException(start); |
30970 int end = start + length; | 30833 int end = start + length; |
30971 if (end > a.length) throw new IndexOutOfRangeException(end); | 30834 if (end > a.length) throw new IndexOutOfRangeException(end); |
30972 for (int i = start; i < end; i++) { | 30835 for (int i = start; i < end; i++) { |
30973 accumulator.add(a[i]); | 30836 accumulator.add(a[i]); |
30974 } | 30837 } |
30975 return accumulator; | 30838 return accumulator; |
30976 } | 30839 } |
30977 } | 30840 } |
OLD | NEW |