| OLD | NEW |
| 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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 class CanvasElement extends Element native "*HTMLCanvasElement" { | 778 class CanvasElement extends Element native "*HTMLCanvasElement" { |
| 779 | 779 |
| 780 ///@docsEditable true | 780 ///@docsEditable true |
| 781 factory CanvasElement({int width, int height}) { | 781 factory CanvasElement({int width, int height}) { |
| 782 var e = document.$dom_createElement("canvas"); | 782 var e = document.$dom_createElement("canvas"); |
| 783 if (width != null) e.width = width; | 783 if (width != null) e.width = width; |
| 784 if (height != null) e.height = height; | 784 if (height != null) e.height = height; |
| 785 return e; | 785 return e; |
| 786 } | 786 } |
| 787 | 787 |
| 788 /// The height of this canvas element in CSS pixels. | |
| 789 /// @domName HTMLCanvasElement.height; @docsEditable true | 788 /// @domName HTMLCanvasElement.height; @docsEditable true |
| 790 int height; | 789 int height; |
| 791 | 790 |
| 792 /// The width of this canvas element in CSS pixels. | |
| 793 /// @domName HTMLCanvasElement.width; @docsEditable true | 791 /// @domName HTMLCanvasElement.width; @docsEditable true |
| 794 int width; | 792 int width; |
| 795 | 793 |
| 796 /** | |
| 797 * Returns a data URI containing a representation of the image in the | |
| 798 * format specified by type (defaults to 'image/png'). | |
| 799 * | |
| 800 * Data Uri format is as follow `data:[<MIME-type>][;charset=<encoding>][;base
64],<data>` | |
| 801 * | |
| 802 * Optional parameter [quality] in the range of 0.0 and 1.0 can be used when r
equesting [type] | |
| 803 * 'image/jpeg' or 'image/webp'. If [quality] is not passed the default | |
| 804 * value is used. Note: the default value varies by browser. | |
| 805 * | |
| 806 * If the height or width of this canvas element is 0, then 'data:' is returne
d, | |
| 807 * representing no data. | |
| 808 * | |
| 809 * If the type requested is not 'image/png', and the returned value is | |
| 810 * 'data:image/png', then the requested type is not supported. | |
| 811 * | |
| 812 * Example usage: | |
| 813 * | |
| 814 * CanvasElement canvas = new CanvasElement(); | |
| 815 * var ctx = canvas.context2d | |
| 816 * ..fillStyle = "rgb(200,0,0)" | |
| 817 * ..fillRect(10, 10, 55, 50); | |
| 818 * var dataUrl = canvas.toDataURL("image/jpeg", 0.95); | |
| 819 * // The Data Uri would look similar to | |
| 820 * // 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA | |
| 821 * // AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO | |
| 822 * // 9TXL0Y4OHwAAAABJRU5ErkJggg==' | |
| 823 * //Create a new image element from the data URI. | |
| 824 * var img = new ImageElement(); | |
| 825 * img.src = dataUrl; | |
| 826 * document.body.children.add(img); | |
| 827 * | |
| 828 * See also: | |
| 829 * | |
| 830 * * [Data URI Scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) from Wiki
pedia. | |
| 831 * | |
| 832 * * [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/DOM/HTMLCanv
asElement) from MDN. | |
| 833 * | |
| 834 * * [toDataUrl](http://dev.w3.org/html5/spec/the-canvas-element.html#dom-canv
as-todataurl) from W3C. | |
| 835 */ | |
| 836 /// @domName HTMLCanvasElement.toDataURL; @docsEditable true | 794 /// @domName HTMLCanvasElement.toDataURL; @docsEditable true |
| 837 @JSName('toDataURL') | 795 @JSName('toDataURL') |
| 838 String toDataUrl(String type, [num quality]) native; | 796 String toDataUrl(String type, [num quality]) native; |
| 839 | 797 |
| 840 | 798 |
| 841 CanvasRenderingContext getContext(String contextId) native; | 799 CanvasRenderingContext getContext(String contextId) native; |
| 842 CanvasRenderingContext2D get context2d => getContext('2d'); | 800 CanvasRenderingContext2D get context2d => getContext('2d'); |
| 843 } | 801 } |
| 844 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 802 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 845 // for details. All rights reserved. Use of this source code is governed by a | 803 // for details. All rights reserved. Use of this source code is governed by a |
| 846 // BSD-style license that can be found in the LICENSE file. | 804 // BSD-style license that can be found in the LICENSE file. |
| 847 | 805 |
| 848 | 806 |
| 849 /** | |
| 850 * An opaque canvas object representing a gradient. | |
| 851 * | |
| 852 * Created by calling [createLinearGradient] or [createRadialGradient] on a | |
| 853 * [CanvasRenderingContext2D] object. | |
| 854 * | |
| 855 * Example usage: | |
| 856 * | |
| 857 * var canvas = new CanvasElement(width: 600, height: 600); | |
| 858 * var ctx = canvas.context2d; | |
| 859 * ctx.clearRect(0, 0, 600, 600); | |
| 860 * ctx.save(); | |
| 861 * // Create radial gradient. | |
| 862 * CanvasGradient gradient = ctx.createRadialGradient(0, 0, 0, 0, 0, 600); | |
| 863 * gradient.addColorStop(0, '#000'); | |
| 864 * gradient.addColorStop(1, 'rgb(255, 255, 255)'); | |
| 865 * // Assign gradients to fill. | |
| 866 * ctx.fillStyle = gradient; | |
| 867 * // Draw a rectangle with a gradient fill. | |
| 868 * ctx.fillRect(0, 0, 600, 600); | |
| 869 * ctx.save(); | |
| 870 * document.body.children.add(canvas); | |
| 871 * | |
| 872 * See also: | |
| 873 * | |
| 874 * * [CanvasGradient](https://developer.mozilla.org/en-US/docs/DOM/CanvasGradien
t) from MDN. | |
| 875 * * [CanvasGradient](http://www.whatwg.org/specs/web-apps/current-work/multipag
e/the-canvas-element.html#canvasgradient) from whatwg. | |
| 876 * * [CanvasGradient](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvasgra
dient) from W3C. | |
| 877 */ | |
| 878 /// @domName CanvasGradient; @docsEditable true | 807 /// @domName CanvasGradient; @docsEditable true |
| 879 class CanvasGradient native "*CanvasGradient" { | 808 class CanvasGradient native "*CanvasGradient" { |
| 880 | 809 |
| 881 /** | |
| 882 * Adds a color stop to this gradient at the offset. | |
| 883 * | |
| 884 * The [offset] can range between 0.0 and 1.0. | |
| 885 * | |
| 886 * See also: | |
| 887 * | |
| 888 * * [Multiple Color Stops](https://developer.mozilla.org/en-US/docs/CSS/linea
r-gradient#Gradient_with_multiple_color_stops) from MDN. | |
| 889 */ | |
| 890 /// @domName CanvasGradient.addColorStop; @docsEditable true | 810 /// @domName CanvasGradient.addColorStop; @docsEditable true |
| 891 void addColorStop(num offset, String color) native; | 811 void addColorStop(num offset, String color) native; |
| 892 } | 812 } |
| 893 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 813 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 894 // for details. All rights reserved. Use of this source code is governed by a | 814 // for details. All rights reserved. Use of this source code is governed by a |
| 895 // BSD-style license that can be found in the LICENSE file. | 815 // BSD-style license that can be found in the LICENSE file. |
| 896 | 816 |
| 897 | 817 |
| 898 /** | |
| 899 * An opaque object representing a pattern of image, canvas, or video. | |
| 900 * | |
| 901 * Created by calling [createPattern] on a [CanvasRenderingContext2D] object. | |
| 902 * | |
| 903 * Example usage: | |
| 904 * | |
| 905 * var canvas = new CanvasElement(width: 600, height: 600); | |
| 906 * var ctx = canvas.context2d; | |
| 907 * var img = new ImageElement(); | |
| 908 * // Image src needs to be loaded before pattern is applied. | |
| 909 * img.on.load.add((event) { | |
| 910 * // When the image is loaded, create a pattern | |
| 911 * // from the ImageElement. | |
| 912 * CanvasPattern pattern = ctx.createPattern(img, 'repeat'); | |
| 913 * ctx.rect(0, 0, canvas.width, canvas.height); | |
| 914 * ctx.fillStyle = pattern; | |
| 915 * ctx.fill(); | |
| 916 * }); | |
| 917 * img.src = "images/foo.jpg"; | |
| 918 * document.body.children.add(canvas); | |
| 919 * | |
| 920 * See also: | |
| 921 * * [CanvasPattern](https://developer.mozilla.org/en-US/docs/DOM/CanvasPattern)
from MDN. | |
| 922 * * [CanvasPattern](http://www.whatwg.org/specs/web-apps/current-work/multipage
/the-canvas-element.html#canvaspattern) from whatwg. | |
| 923 * * [CanvasPattern](http://www.w3.org/TR/2010/WD-2dcontext-20100304/#canvaspatt
ern) from W3C. | |
| 924 */ | |
| 925 /// @domName CanvasPattern; @docsEditable true | 818 /// @domName CanvasPattern; @docsEditable true |
| 926 class CanvasPattern native "*CanvasPattern" { | 819 class CanvasPattern native "*CanvasPattern" { |
| 927 } | 820 } |
| 928 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 821 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 929 // for details. All rights reserved. Use of this source code is governed by a | 822 // for details. All rights reserved. Use of this source code is governed by a |
| 930 // BSD-style license that can be found in the LICENSE file. | 823 // BSD-style license that can be found in the LICENSE file. |
| 931 | 824 |
| 932 | 825 |
| 933 /** | |
| 934 * A rendering context for a canvas element. | |
| 935 * | |
| 936 * This context is extended by [CanvasRenderingContext2D] and | |
| 937 * [WebGLRenderingContext]. | |
| 938 */ | |
| 939 /// @domName CanvasRenderingContext; @docsEditable true | 826 /// @domName CanvasRenderingContext; @docsEditable true |
| 940 class CanvasRenderingContext native "*CanvasRenderingContext" { | 827 class CanvasRenderingContext native "*CanvasRenderingContext" { |
| 941 | 828 |
| 942 /// Reference to the canvas element to which this context belongs. | |
| 943 /// @domName CanvasRenderingContext.canvas; @docsEditable true | 829 /// @domName CanvasRenderingContext.canvas; @docsEditable true |
| 944 final CanvasElement canvas; | 830 final CanvasElement canvas; |
| 945 } | 831 } |
| 946 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 832 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 947 // for details. All rights reserved. Use of this source code is governed by a | 833 // for details. All rights reserved. Use of this source code is governed by a |
| 948 // BSD-style license that can be found in the LICENSE file. | 834 // BSD-style license that can be found in the LICENSE file. |
| 949 | 835 |
| 950 | 836 |
| 951 /// @domName CanvasRenderingContext2D | 837 /// @domName CanvasRenderingContext2D |
| 952 class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen
deringContext2D" { | 838 class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen
deringContext2D" { |
| (...skipping 4739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5692 | 5578 |
| 5693 /// @domName DirectoryReaderSync.readEntries; @docsEditable true | 5579 /// @domName DirectoryReaderSync.readEntries; @docsEditable true |
| 5694 @Returns('_EntryArraySync') @Creates('_EntryArraySync') | 5580 @Returns('_EntryArraySync') @Creates('_EntryArraySync') |
| 5695 List<EntrySync> readEntries() native; | 5581 List<EntrySync> readEntries() native; |
| 5696 } | 5582 } |
| 5697 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 5583 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 5698 // for details. All rights reserved. Use of this source code is governed by a | 5584 // for details. All rights reserved. Use of this source code is governed by a |
| 5699 // BSD-style license that can be found in the LICENSE file. | 5585 // BSD-style license that can be found in the LICENSE file. |
| 5700 | 5586 |
| 5701 | 5587 |
| 5702 /** | |
| 5703 * Represents an HTML <div> element. | |
| 5704 * | |
| 5705 * The [DivElement] is a generic container for content and does not have any | |
| 5706 * special significance. It is functionally similar to [SpanElement]. | |
| 5707 * | |
| 5708 * The [DivElement] is a block-level element, as opposed to [SpanElement], | |
| 5709 * which is an inline-level element. | |
| 5710 * | |
| 5711 * Example usage: | |
| 5712 * | |
| 5713 * DivElement div = new DivElement(); | |
| 5714 * div.text = 'Here's my new DivElem | |
| 5715 * document.body.elements.add(elem); | |
| 5716 * | |
| 5717 * See also: | |
| 5718 * | |
| 5719 * * [HTML <div> element](http://www.w3.org/TR/html-markup/div.html) from W3C. | |
| 5720 * * [Block-level element](http://www.w3.org/TR/CSS2/visuren.html#block-boxes) f
rom W3C. | |
| 5721 * * [Inline-level element](http://www.w3.org/TR/CSS2/visuren.html#inline-boxes)
from W3C. | |
| 5722 */ | |
| 5723 /// @domName HTMLDivElement; @docsEditable true | 5588 /// @domName HTMLDivElement; @docsEditable true |
| 5724 class DivElement extends Element native "*HTMLDivElement" { | 5589 class DivElement extends Element native "*HTMLDivElement" { |
| 5725 | 5590 |
| 5726 ///@docsEditable true | 5591 ///@docsEditable true |
| 5727 factory DivElement() => document.$dom_createElement("div"); | 5592 factory DivElement() => document.$dom_createElement("div"); |
| 5728 } | 5593 } |
| 5729 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 5594 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 5730 // for details. All rights reserved. Use of this source code is governed by a | 5595 // for details. All rights reserved. Use of this source code is governed by a |
| 5731 // BSD-style license that can be found in the LICENSE file. | 5596 // BSD-style license that can be found in the LICENSE file. |
| 5732 | 5597 |
| 5733 | 5598 |
| 5734 /// @domName Document | 5599 /// @domName Document |
| 5735 /** | 5600 /** |
| 5736 * The base class for all documents. | 5601 * The base class for all documents. |
| 5737 * | 5602 * |
| 5738 * Each web page loaded in the browser has its own [Document] object, which is | 5603 * Each web page loaded in the browser has its own [Document] object, which is |
| 5739 * typically an [HtmlDocument]. | 5604 * typically an [HtmlDocument]. |
| 5740 * | 5605 * |
| 5741 * If you aren't comfortable with DOM concepts, see the Dart tutorial | 5606 * If you aren't comfortable with DOM concepts, see the Dart tutorial |
| 5742 * [Target 2: Connect Dart & HTML](http://www.dartlang.org/docs/tutorials/connec
t-dart-html/). | 5607 * [Target 2: Connect Dart & HTML](http://www.dartlang.org/docs/tutorials/connec
t-dart-html/). |
| 5743 */ | 5608 */ |
| 5744 class Document extends Node native "*Document" | 5609 class Document extends Node native "*Document" |
| 5745 { | 5610 { |
| 5746 | 5611 |
| 5747 | 5612 |
| 5748 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 5613 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
| 5749 DocumentEvents get on => | 5614 DocumentEvents get on => |
| 5750 new DocumentEvents(this); | 5615 new DocumentEvents(this); |
| 5751 | 5616 |
| 5752 /// Moved to [HtmlDocument]. | |
| 5753 /// @domName Document.body; @docsEditable true | 5617 /// @domName Document.body; @docsEditable true |
| 5754 @JSName('body') | 5618 @JSName('body') |
| 5755 Element $dom_body; | 5619 Element $dom_body; |
| 5756 | 5620 |
| 5757 /// @domName Document.charset; @docsEditable true | 5621 /// @domName Document.charset; @docsEditable true |
| 5758 String charset; | 5622 String charset; |
| 5759 | 5623 |
| 5760 /// @domName Document.cookie; @docsEditable true | 5624 /// @domName Document.cookie; @docsEditable true |
| 5761 String cookie; | 5625 String cookie; |
| 5762 | 5626 |
| 5763 /// Returns the [Window] associated with the document. | |
| 5764 /// @domName Document.defaultView; @docsEditable true | 5627 /// @domName Document.defaultView; @docsEditable true |
| 5765 Window get window => _convertNativeToDart_Window(this._window); | 5628 Window get window => _convertNativeToDart_Window(this._window); |
| 5766 @JSName('defaultView') | 5629 @JSName('defaultView') |
| 5767 @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object') | 5630 @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object') |
| 5768 final dynamic _window; | 5631 final dynamic _window; |
| 5769 | 5632 |
| 5770 /// @domName Document.documentElement; @docsEditable true | 5633 /// @domName Document.documentElement; @docsEditable true |
| 5771 final Element documentElement; | 5634 final Element documentElement; |
| 5772 | 5635 |
| 5773 /// @domName Document.domain; @docsEditable true | 5636 /// @domName Document.domain; @docsEditable true |
| 5774 final String domain; | 5637 final String domain; |
| 5775 | 5638 |
| 5776 /// Moved to [HtmlDocument]. | |
| 5777 /// @domName Document.head; @docsEditable true | 5639 /// @domName Document.head; @docsEditable true |
| 5778 @JSName('head') | 5640 @JSName('head') |
| 5779 final HeadElement $dom_head; | 5641 final HeadElement $dom_head; |
| 5780 | 5642 |
| 5781 /// @domName Document.implementation; @docsEditable true | 5643 /// @domName Document.implementation; @docsEditable true |
| 5782 final DomImplementation implementation; | 5644 final DomImplementation implementation; |
| 5783 | 5645 |
| 5784 /// Moved to [HtmlDocument]. | |
| 5785 /// @domName Document.lastModified; @docsEditable true | 5646 /// @domName Document.lastModified; @docsEditable true |
| 5786 @JSName('lastModified') | 5647 @JSName('lastModified') |
| 5787 final String $dom_lastModified; | 5648 final String $dom_lastModified; |
| 5788 | 5649 |
| 5789 /// @domName Document.preferredStylesheetSet; @docsEditable true | 5650 /// @domName Document.preferredStylesheetSet; @docsEditable true |
| 5790 @JSName('preferredStylesheetSet') | 5651 @JSName('preferredStylesheetSet') |
| 5791 final String $dom_preferredStylesheetSet; | 5652 final String $dom_preferredStylesheetSet; |
| 5792 | 5653 |
| 5793 /// @domName Document.readyState; @docsEditable true | 5654 /// @domName Document.readyState; @docsEditable true |
| 5794 final String readyState; | 5655 final String readyState; |
| 5795 | 5656 |
| 5796 /// Moved to [HtmlDocument]. | |
| 5797 /// @domName Document.referrer; @docsEditable true | 5657 /// @domName Document.referrer; @docsEditable true |
| 5798 @JSName('referrer') | 5658 @JSName('referrer') |
| 5799 final String $dom_referrer; | 5659 final String $dom_referrer; |
| 5800 | 5660 |
| 5801 /// @domName Document.selectedStylesheetSet; @docsEditable true | 5661 /// @domName Document.selectedStylesheetSet; @docsEditable true |
| 5802 @JSName('selectedStylesheetSet') | 5662 @JSName('selectedStylesheetSet') |
| 5803 String $dom_selectedStylesheetSet; | 5663 String $dom_selectedStylesheetSet; |
| 5804 | 5664 |
| 5805 /// Moved to [HtmlDocument]. | |
| 5806 /// @domName Document.styleSheets; @docsEditable true | 5665 /// @domName Document.styleSheets; @docsEditable true |
| 5807 @JSName('styleSheets') | 5666 @JSName('styleSheets') |
| 5808 @Returns('_StyleSheetList') @Creates('_StyleSheetList') | 5667 @Returns('_StyleSheetList') @Creates('_StyleSheetList') |
| 5809 final List<StyleSheet> $dom_styleSheets; | 5668 final List<StyleSheet> $dom_styleSheets; |
| 5810 | 5669 |
| 5811 /// Moved to [HtmlDocument]. | |
| 5812 /// @domName Document.title; @docsEditable true | 5670 /// @domName Document.title; @docsEditable true |
| 5813 @JSName('title') | 5671 @JSName('title') |
| 5814 String $dom_title; | 5672 String $dom_title; |
| 5815 | 5673 |
| 5816 /// Moved to [HtmlDocument]. | |
| 5817 /// @domName Document.webkitFullscreenElement; @docsEditable true | 5674 /// @domName Document.webkitFullscreenElement; @docsEditable true |
| 5818 @JSName('webkitFullscreenElement') | 5675 @JSName('webkitFullscreenElement') |
| 5819 final Element $dom_webkitFullscreenElement; | 5676 final Element $dom_webkitFullscreenElement; |
| 5820 | 5677 |
| 5821 /// Moved to [HtmlDocument]. | |
| 5822 /// @domName Document.webkitFullscreenEnabled; @docsEditable true | 5678 /// @domName Document.webkitFullscreenEnabled; @docsEditable true |
| 5823 @JSName('webkitFullscreenEnabled') | 5679 @JSName('webkitFullscreenEnabled') |
| 5824 final bool $dom_webkitFullscreenEnabled; | 5680 final bool $dom_webkitFullscreenEnabled; |
| 5825 | 5681 |
| 5826 /// Moved to [HtmlDocument]. | |
| 5827 /// @domName Document.webkitHidden; @docsEditable true | 5682 /// @domName Document.webkitHidden; @docsEditable true |
| 5828 @JSName('webkitHidden') | 5683 @JSName('webkitHidden') |
| 5829 final bool $dom_webkitHidden; | 5684 final bool $dom_webkitHidden; |
| 5830 | 5685 |
| 5831 /// Moved to [HtmlDocument]. | |
| 5832 /// @domName Document.webkitIsFullScreen; @docsEditable true | 5686 /// @domName Document.webkitIsFullScreen; @docsEditable true |
| 5833 @JSName('webkitIsFullScreen') | 5687 @JSName('webkitIsFullScreen') |
| 5834 final bool $dom_webkitIsFullScreen; | 5688 final bool $dom_webkitIsFullScreen; |
| 5835 | 5689 |
| 5836 /// Moved to [HtmlDocument]. | |
| 5837 /// @domName Document.webkitPointerLockElement; @docsEditable true | 5690 /// @domName Document.webkitPointerLockElement; @docsEditable true |
| 5838 @JSName('webkitPointerLockElement') | 5691 @JSName('webkitPointerLockElement') |
| 5839 final Element $dom_webkitPointerLockElement; | 5692 final Element $dom_webkitPointerLockElement; |
| 5840 | 5693 |
| 5841 /// Moved to [HtmlDocument]. | |
| 5842 /// @domName Document.webkitVisibilityState; @docsEditable true | 5694 /// @domName Document.webkitVisibilityState; @docsEditable true |
| 5843 @JSName('webkitVisibilityState') | 5695 @JSName('webkitVisibilityState') |
| 5844 final String $dom_webkitVisibilityState; | 5696 final String $dom_webkitVisibilityState; |
| 5845 | 5697 |
| 5846 /// Use the [Range] constructor instead. | |
| 5847 /// @domName Document.caretRangeFromPoint; @docsEditable true | 5698 /// @domName Document.caretRangeFromPoint; @docsEditable true |
| 5848 @JSName('caretRangeFromPoint') | 5699 @JSName('caretRangeFromPoint') |
| 5849 Range $dom_caretRangeFromPoint(int x, int y) native; | 5700 Range $dom_caretRangeFromPoint(int x, int y) native; |
| 5850 | 5701 |
| 5851 /// @domName Document.createCDATASection; @docsEditable true | 5702 /// @domName Document.createCDATASection; @docsEditable true |
| 5852 @JSName('createCDATASection') | 5703 @JSName('createCDATASection') |
| 5853 CDataSection createCDataSection(String data) native; | 5704 CDataSection createCDataSection(String data) native; |
| 5854 | 5705 |
| 5855 /// @domName Document.createDocumentFragment; @docsEditable true | 5706 /// @domName Document.createDocumentFragment; @docsEditable true |
| 5856 DocumentFragment createDocumentFragment() native; | 5707 DocumentFragment createDocumentFragment() native; |
| 5857 | 5708 |
| 5858 /// Deprecated: use new Element.tag(tagName) instead. | |
| 5859 /// @domName Document.createElement; @docsEditable true | 5709 /// @domName Document.createElement; @docsEditable true |
| 5860 @JSName('createElement') | 5710 @JSName('createElement') |
| 5861 Element $dom_createElement(String tagName) native; | 5711 Element $dom_createElement(String tagName) native; |
| 5862 | 5712 |
| 5863 /// @domName Document.createElementNS; @docsEditable true | 5713 /// @domName Document.createElementNS; @docsEditable true |
| 5864 @JSName('createElementNS') | 5714 @JSName('createElementNS') |
| 5865 Element $dom_createElementNS(String namespaceURI, String qualifiedName) native
; | 5715 Element $dom_createElementNS(String namespaceURI, String qualifiedName) native
; |
| 5866 | 5716 |
| 5867 /// @domName Document.createEvent; @docsEditable true | 5717 /// @domName Document.createEvent; @docsEditable true |
| 5868 @JSName('createEvent') | 5718 @JSName('createEvent') |
| 5869 Event $dom_createEvent(String eventType) native; | 5719 Event $dom_createEvent(String eventType) native; |
| 5870 | 5720 |
| 5871 /// @domName Document.createRange; @docsEditable true | 5721 /// @domName Document.createRange; @docsEditable true |
| 5872 @JSName('createRange') | 5722 @JSName('createRange') |
| 5873 Range $dom_createRange() native; | 5723 Range $dom_createRange() native; |
| 5874 | 5724 |
| 5875 /// @domName Document.createTextNode; @docsEditable true | 5725 /// @domName Document.createTextNode; @docsEditable true |
| 5876 @JSName('createTextNode') | 5726 @JSName('createTextNode') |
| 5877 Text $dom_createTextNode(String data) native; | 5727 Text $dom_createTextNode(String data) native; |
| 5878 | 5728 |
| 5879 /// @domName Document.createTouch; @docsEditable true | 5729 /// @domName Document.createTouch; @docsEditable true |
| 5880 Touch $dom_createTouch(LocalWindow window, EventTarget target, int identifier,
int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRa
diusY, num webkitRotationAngle, num webkitForce) { | 5730 Touch $dom_createTouch(LocalWindow window, EventTarget target, int identifier,
int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRa
diusY, num webkitRotationAngle, num webkitForce) { |
| 5881 var target_1 = _convertDartToNative_EventTarget(target); | 5731 var target_1 = _convertDartToNative_EventTarget(target); |
| 5882 return _$dom_createTouch_1(window, target_1, identifier, pageX, pageY, scree
nX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce); | 5732 return _$dom_createTouch_1(window, target_1, identifier, pageX, pageY, scree
nX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce); |
| 5883 } | 5733 } |
| 5884 @JSName('createTouch') | 5734 @JSName('createTouch') |
| 5885 Touch _$dom_createTouch_1(LocalWindow window, target, identifier, pageX, pageY
, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitFor
ce) native; | 5735 Touch _$dom_createTouch_1(LocalWindow window, target, identifier, pageX, pageY
, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitFor
ce) native; |
| 5886 | 5736 |
| 5887 /// Use the [TouchList] constructor isntead. | |
| 5888 /// @domName Document.createTouchList; @docsEditable true | 5737 /// @domName Document.createTouchList; @docsEditable true |
| 5889 @JSName('createTouchList') | 5738 @JSName('createTouchList') |
| 5890 TouchList $dom_createTouchList() native; | 5739 TouchList $dom_createTouchList() native; |
| 5891 | 5740 |
| 5892 /// Moved to [HtmlDocument]. | |
| 5893 /// @domName Document.elementFromPoint; @docsEditable true | 5741 /// @domName Document.elementFromPoint; @docsEditable true |
| 5894 @JSName('elementFromPoint') | 5742 @JSName('elementFromPoint') |
| 5895 Element $dom_elementFromPoint(int x, int y) native; | 5743 Element $dom_elementFromPoint(int x, int y) native; |
| 5896 | 5744 |
| 5897 /// @domName Document.execCommand; @docsEditable true | 5745 /// @domName Document.execCommand; @docsEditable true |
| 5898 bool execCommand(String command, bool userInterface, String value) native; | 5746 bool execCommand(String command, bool userInterface, String value) native; |
| 5899 | 5747 |
| 5900 /// @domName Document.getCSSCanvasContext; @docsEditable true | 5748 /// @domName Document.getCSSCanvasContext; @docsEditable true |
| 5901 @JSName('getCSSCanvasContext') | 5749 @JSName('getCSSCanvasContext') |
| 5902 CanvasRenderingContext $dom_getCssCanvasContext(String contextId, String name,
int width, int height) native; | 5750 CanvasRenderingContext $dom_getCssCanvasContext(String contextId, String name,
int width, int height) native; |
| 5903 | 5751 |
| 5904 /// Deprecated: use query("#$elementId") instead. | |
| 5905 /// @domName Document.getElementById; @docsEditable true | 5752 /// @domName Document.getElementById; @docsEditable true |
| 5906 @JSName('getElementById') | 5753 @JSName('getElementById') |
| 5907 Element $dom_getElementById(String elementId) native; | 5754 Element $dom_getElementById(String elementId) native; |
| 5908 | 5755 |
| 5909 /// @domName Document.getElementsByClassName; @docsEditable true | 5756 /// @domName Document.getElementsByClassName; @docsEditable true |
| 5910 @JSName('getElementsByClassName') | 5757 @JSName('getElementsByClassName') |
| 5911 @Returns('NodeList') @Creates('NodeList') | 5758 @Returns('NodeList') @Creates('NodeList') |
| 5912 List<Node> $dom_getElementsByClassName(String tagname) native; | 5759 List<Node> $dom_getElementsByClassName(String tagname) native; |
| 5913 | 5760 |
| 5914 /// @domName Document.getElementsByName; @docsEditable true | 5761 /// @domName Document.getElementsByName; @docsEditable true |
| (...skipping 14 matching lines...) Expand all Loading... |
| 5929 | 5776 |
| 5930 /// @domName Document.queryCommandState; @docsEditable true | 5777 /// @domName Document.queryCommandState; @docsEditable true |
| 5931 bool queryCommandState(String command) native; | 5778 bool queryCommandState(String command) native; |
| 5932 | 5779 |
| 5933 /// @domName Document.queryCommandSupported; @docsEditable true | 5780 /// @domName Document.queryCommandSupported; @docsEditable true |
| 5934 bool queryCommandSupported(String command) native; | 5781 bool queryCommandSupported(String command) native; |
| 5935 | 5782 |
| 5936 /// @domName Document.queryCommandValue; @docsEditable true | 5783 /// @domName Document.queryCommandValue; @docsEditable true |
| 5937 String queryCommandValue(String command) native; | 5784 String queryCommandValue(String command) native; |
| 5938 | 5785 |
| 5939 /// Deprecated: renamed to the shorter name [query]. | |
| 5940 /// @domName Document.querySelector; @docsEditable true | 5786 /// @domName Document.querySelector; @docsEditable true |
| 5941 @JSName('querySelector') | 5787 @JSName('querySelector') |
| 5942 Element $dom_querySelector(String selectors) native; | 5788 Element $dom_querySelector(String selectors) native; |
| 5943 | 5789 |
| 5944 /// Deprecated: use query("#$elementId") instead. | |
| 5945 /// @domName Document.querySelectorAll; @docsEditable true | 5790 /// @domName Document.querySelectorAll; @docsEditable true |
| 5946 @JSName('querySelectorAll') | 5791 @JSName('querySelectorAll') |
| 5947 @Returns('NodeList') @Creates('NodeList') | 5792 @Returns('NodeList') @Creates('NodeList') |
| 5948 List<Node> $dom_querySelectorAll(String selectors) native; | 5793 List<Node> $dom_querySelectorAll(String selectors) native; |
| 5949 | 5794 |
| 5950 /// Moved to [HtmlDocument]. | |
| 5951 /// @domName Document.webkitCancelFullScreen; @docsEditable true | 5795 /// @domName Document.webkitCancelFullScreen; @docsEditable true |
| 5952 @JSName('webkitCancelFullScreen') | 5796 @JSName('webkitCancelFullScreen') |
| 5953 void $dom_webkitCancelFullScreen() native; | 5797 void $dom_webkitCancelFullScreen() native; |
| 5954 | 5798 |
| 5955 /// Moved to [HtmlDocument]. | |
| 5956 /// @domName Document.webkitExitFullscreen; @docsEditable true | 5799 /// @domName Document.webkitExitFullscreen; @docsEditable true |
| 5957 @JSName('webkitExitFullscreen') | 5800 @JSName('webkitExitFullscreen') |
| 5958 void $dom_webkitExitFullscreen() native; | 5801 void $dom_webkitExitFullscreen() native; |
| 5959 | 5802 |
| 5960 /// Moved to [HtmlDocument]. | |
| 5961 /// @domName Document.webkitExitPointerLock; @docsEditable true | 5803 /// @domName Document.webkitExitPointerLock; @docsEditable true |
| 5962 @JSName('webkitExitPointerLock') | 5804 @JSName('webkitExitPointerLock') |
| 5963 void $dom_webkitExitPointerLock() native; | 5805 void $dom_webkitExitPointerLock() native; |
| 5964 | 5806 |
| 5965 | 5807 |
| 5966 /** | 5808 /** |
| 5967 * Finds the first descendant element of this document that matches the | 5809 * Finds the first descendant element of this document that matches the |
| 5968 * specified group of selectors. | 5810 * specified group of selectors. |
| 5969 * | 5811 * |
| 5970 * Unless your webpage contains multiple documents, the top-level query | 5812 * Unless your webpage contains multiple documents, the top-level query |
| (...skipping 4207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10178 * [onComplete] callback. | 10020 * [onComplete] callback. |
| 10179 * | 10021 * |
| 10180 * See also: (authorization headers)[http://en.wikipedia.org/wiki/Basic_access
_authentication]. | 10022 * See also: (authorization headers)[http://en.wikipedia.org/wiki/Basic_access
_authentication]. |
| 10181 */ | 10023 */ |
| 10182 factory HttpRequest.getWithCredentials(String url, | 10024 factory HttpRequest.getWithCredentials(String url, |
| 10183 onComplete(HttpRequest request)) => | 10025 onComplete(HttpRequest request)) => |
| 10184 _HttpRequestFactoryProvider.createHttpRequest_getWithCredentials(url, | 10026 _HttpRequestFactoryProvider.createHttpRequest_getWithCredentials(url, |
| 10185 onComplete); | 10027 onComplete); |
| 10186 | 10028 |
| 10187 | 10029 |
| 10188 /** | |
| 10189 * General constructor for any type of request (GET, POST, etc). | |
| 10190 * | |
| 10191 * This call is used in conjunction with [open]: | |
| 10192 * | |
| 10193 * var request = new HttpRequest(); | |
| 10194 * request.open('GET', 'http://dartlang.org') | |
| 10195 * request.on.load.add((event) => print('Request complete')); | |
| 10196 * | |
| 10197 * is the (more verbose) equivalent of | |
| 10198 * | |
| 10199 * var request = new HttpRequest.get('http://dartlang.org', | |
| 10200 * (event) => print('Request complete')); | |
| 10201 */ | |
| 10202 ///@docsEditable true | 10030 ///@docsEditable true |
| 10203 factory HttpRequest() => _HttpRequestFactoryProvider.createHttpRequest(); | 10031 factory HttpRequest() => _HttpRequestFactoryProvider.createHttpRequest(); |
| 10204 | 10032 |
| 10205 /** | |
| 10206 * Get the set of [HttpRequestEvents] that this request can respond to. | |
| 10207 * Usually used when adding an EventListener, such as in | |
| 10208 * `document.window.on.keyDown.add((e) => print('keydown happened'))`. | |
| 10209 */ | |
| 10210 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 10033 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
| 10211 HttpRequestEvents get on => | 10034 HttpRequestEvents get on => |
| 10212 new HttpRequestEvents(this); | 10035 new HttpRequestEvents(this); |
| 10213 | 10036 |
| 10214 static const int DONE = 4; | 10037 static const int DONE = 4; |
| 10215 | 10038 |
| 10216 static const int HEADERS_RECEIVED = 2; | 10039 static const int HEADERS_RECEIVED = 2; |
| 10217 | 10040 |
| 10218 static const int LOADING = 3; | 10041 static const int LOADING = 3; |
| 10219 | 10042 |
| 10220 static const int OPENED = 1; | 10043 static const int OPENED = 1; |
| 10221 | 10044 |
| 10222 static const int UNSENT = 0; | 10045 static const int UNSENT = 0; |
| 10223 | 10046 |
| 10224 /** | |
| 10225 * Indicator of the current state of the request: | |
| 10226 * | |
| 10227 * <table> | |
| 10228 * <tr> | |
| 10229 * <td>Value</td> | |
| 10230 * <td>State</td> | |
| 10231 * <td>Meaning</td> | |
| 10232 * </tr> | |
| 10233 * <tr> | |
| 10234 * <td>0</td> | |
| 10235 * <td>unsent</td> | |
| 10236 * <td><code>open()</code> has not yet been called</td> | |
| 10237 * </tr> | |
| 10238 * <tr> | |
| 10239 * <td>1</td> | |
| 10240 * <td>opened</td> | |
| 10241 * <td><code>send()</code> has not yet been called</td> | |
| 10242 * </tr> | |
| 10243 * <tr> | |
| 10244 * <td>2</td> | |
| 10245 * <td>headers received</td> | |
| 10246 * <td><code>sent()</code> has been called; response headers and <code>sta
tus</code> are available</td> | |
| 10247 * </tr> | |
| 10248 * <tr> | |
| 10249 * <td>3</td> <td>loading</td> <td><code>responseText</code> holds some da
ta</td> | |
| 10250 * </tr> | |
| 10251 * <tr> | |
| 10252 * <td>4</td> <td>done</td> <td>request is complete</td> | |
| 10253 * </tr> | |
| 10254 * </table> | |
| 10255 */ | |
| 10256 /// @domName XMLHttpRequest.readyState; @docsEditable true | 10047 /// @domName XMLHttpRequest.readyState; @docsEditable true |
| 10257 final int readyState; | 10048 final int readyState; |
| 10258 | 10049 |
| 10259 /** | |
| 10260 * The data received as a reponse from the request. | |
| 10261 * | |
| 10262 * The data could be in the | |
| 10263 * form of a [String], [ArrayBuffer], [Document], [Blob], or json (also a | |
| 10264 * [String]). `null` indicates request failure. | |
| 10265 */ | |
| 10266 /// @domName XMLHttpRequest.response; @docsEditable true | 10050 /// @domName XMLHttpRequest.response; @docsEditable true |
| 10267 @Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num') | 10051 @Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num') |
| 10268 final Object response; | 10052 final Object response; |
| 10269 | 10053 |
| 10270 /** | |
| 10271 * The response in string form or null on failure. | |
| 10272 */ | |
| 10273 /// @domName XMLHttpRequest.responseText; @docsEditable true | 10054 /// @domName XMLHttpRequest.responseText; @docsEditable true |
| 10274 final String responseText; | 10055 final String responseText; |
| 10275 | 10056 |
| 10276 /** | |
| 10277 * [String] telling the server the desired response format. | |
| 10278 * | |
| 10279 * Default is `String`. | |
| 10280 * Other options are one of 'arraybuffer', 'blob', 'document', 'json', | |
| 10281 * 'text'. Some newer browsers will throw NS_ERROR_DOM_INVALID_ACCESS_ERR if | |
| 10282 * `responseType` is set while performing a synchronous request. | |
| 10283 * | |
| 10284 * See also: [MDN responseType](https://developer.mozilla.org/en-US/docs/DOM/X
MLHttpRequest#responseType) | |
| 10285 */ | |
| 10286 /// @domName XMLHttpRequest.responseType; @docsEditable true | 10057 /// @domName XMLHttpRequest.responseType; @docsEditable true |
| 10287 String responseType; | 10058 String responseType; |
| 10288 | 10059 |
| 10289 /** | |
| 10290 * The request response, or null on failure. | |
| 10291 * | |
| 10292 * The response is processed as | |
| 10293 * `text/xml` stream, unless responseType = 'document' and the request is | |
| 10294 * synchronous. | |
| 10295 */ | |
| 10296 /// @domName XMLHttpRequest.responseXML; @docsEditable true | 10060 /// @domName XMLHttpRequest.responseXML; @docsEditable true |
| 10297 @JSName('responseXML') | 10061 @JSName('responseXML') |
| 10298 final Document responseXml; | 10062 final Document responseXml; |
| 10299 | 10063 |
| 10300 /** | |
| 10301 * The http result code from the request (200, 404, etc). | |
| 10302 * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_sta
tus_codes) | |
| 10303 */ | |
| 10304 /// @domName XMLHttpRequest.status; @docsEditable true | 10064 /// @domName XMLHttpRequest.status; @docsEditable true |
| 10305 final int status; | 10065 final int status; |
| 10306 | 10066 |
| 10307 /** | |
| 10308 * The request response string (such as "200 OK"). | |
| 10309 * See also: [Http Status Codes](http://en.wikipedia.org/wiki/List_of_HTTP_sta
tus_codes) | |
| 10310 */ | |
| 10311 /// @domName XMLHttpRequest.statusText; @docsEditable true | 10067 /// @domName XMLHttpRequest.statusText; @docsEditable true |
| 10312 final String statusText; | 10068 final String statusText; |
| 10313 | 10069 |
| 10314 /** | |
| 10315 * [EventTarget] that can hold listeners to track the progress of the request. | |
| 10316 * The events fired will be members of [HttpRequestUploadEvents]. | |
| 10317 */ | |
| 10318 /// @domName XMLHttpRequest.upload; @docsEditable true | 10070 /// @domName XMLHttpRequest.upload; @docsEditable true |
| 10319 final HttpRequestUpload upload; | 10071 final HttpRequestUpload upload; |
| 10320 | 10072 |
| 10321 /** | |
| 10322 * True if cross-site requests should use credentials such as cookies | |
| 10323 * or authorization headers; false otherwise. | |
| 10324 * | |
| 10325 * This value is ignored for same-site requests. | |
| 10326 */ | |
| 10327 /// @domName XMLHttpRequest.withCredentials; @docsEditable true | 10073 /// @domName XMLHttpRequest.withCredentials; @docsEditable true |
| 10328 bool withCredentials; | 10074 bool withCredentials; |
| 10329 | 10075 |
| 10330 /** | |
| 10331 * Stop the current request. | |
| 10332 * | |
| 10333 * The request can only be stopped if readyState is `HEADERS_RECIEVED` or | |
| 10334 * `LOADING`. If this method is not in the process of being sent, the method | |
| 10335 * has no effect. | |
| 10336 */ | |
| 10337 /// @domName XMLHttpRequest.abort; @docsEditable true | 10076 /// @domName XMLHttpRequest.abort; @docsEditable true |
| 10338 void abort() native; | 10077 void abort() native; |
| 10339 | 10078 |
| 10340 /// @domName XMLHttpRequest.addEventListener; @docsEditable true | 10079 /// @domName XMLHttpRequest.addEventListener; @docsEditable true |
| 10341 @JSName('addEventListener') | 10080 @JSName('addEventListener') |
| 10342 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; | 10081 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu
re]) native; |
| 10343 | 10082 |
| 10344 /// @domName XMLHttpRequest.dispatchEvent; @docsEditable true | 10083 /// @domName XMLHttpRequest.dispatchEvent; @docsEditable true |
| 10345 @JSName('dispatchEvent') | 10084 @JSName('dispatchEvent') |
| 10346 bool $dom_dispatchEvent(Event evt) native; | 10085 bool $dom_dispatchEvent(Event evt) native; |
| 10347 | 10086 |
| 10348 /** | |
| 10349 * Retrieve all the response headers from a request. | |
| 10350 * | |
| 10351 * `null` if no headers have been received. For multipart requests, | |
| 10352 * `getAllResponseHeaders` will return the response headers for the current | |
| 10353 * part of the request. | |
| 10354 * | |
| 10355 * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_
header_fields#Responses) | |
| 10356 * for a list of common response headers. | |
| 10357 */ | |
| 10358 /// @domName XMLHttpRequest.getAllResponseHeaders; @docsEditable true | 10087 /// @domName XMLHttpRequest.getAllResponseHeaders; @docsEditable true |
| 10359 String getAllResponseHeaders() native; | 10088 String getAllResponseHeaders() native; |
| 10360 | 10089 |
| 10361 /** | |
| 10362 * Return the response header named `header`, or `null` if not found. | |
| 10363 * | |
| 10364 * See also [HTTP response headers](http://en.wikipedia.org/wiki/List_of_HTTP_
header_fields#Responses) | |
| 10365 * for a list of common response headers. | |
| 10366 */ | |
| 10367 /// @domName XMLHttpRequest.getResponseHeader; @docsEditable true | 10090 /// @domName XMLHttpRequest.getResponseHeader; @docsEditable true |
| 10368 String getResponseHeader(String header) native; | 10091 String getResponseHeader(String header) native; |
| 10369 | 10092 |
| 10370 /** | |
| 10371 * Specify the desired `url`, and `method` to use in making the request. | |
| 10372 * | |
| 10373 * By default the request is done asyncronously, with no user or password | |
| 10374 * authentication information. If `async` is false, the request will be send | |
| 10375 * synchronously. | |
| 10376 * | |
| 10377 * Calling `open` again on a currently active request is equivalent to | |
| 10378 * calling `abort`. | |
| 10379 */ | |
| 10380 /// @domName XMLHttpRequest.open; @docsEditable true | 10093 /// @domName XMLHttpRequest.open; @docsEditable true |
| 10381 void open(String method, String url, [bool async, String user, String password
]) native; | 10094 void open(String method, String url, [bool async, String user, String password
]) native; |
| 10382 | 10095 |
| 10383 /** | |
| 10384 * Specify a particular MIME type (such as `text/xml`) desired for the | |
| 10385 * response. | |
| 10386 * | |
| 10387 * This value must be set before the request has been sent. See also the list | |
| 10388 * of [common MIME types](http://en.wikipedia.org/wiki/Internet_media_type#Lis
t_of_common_media_types) | |
| 10389 */ | |
| 10390 /// @domName XMLHttpRequest.overrideMimeType; @docsEditable true | 10096 /// @domName XMLHttpRequest.overrideMimeType; @docsEditable true |
| 10391 void overrideMimeType(String override) native; | 10097 void overrideMimeType(String override) native; |
| 10392 | 10098 |
| 10393 /// @domName XMLHttpRequest.removeEventListener; @docsEditable true | 10099 /// @domName XMLHttpRequest.removeEventListener; @docsEditable true |
| 10394 @JSName('removeEventListener') | 10100 @JSName('removeEventListener') |
| 10395 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 10101 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 10396 | 10102 |
| 10397 /** | |
| 10398 * Send the request with any given `data`. | |
| 10399 * | |
| 10400 * See also: | |
| 10401 * [send() docs](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#s
end()) | |
| 10402 * from MDN. | |
| 10403 */ | |
| 10404 /// @domName XMLHttpRequest.send; @docsEditable true | 10103 /// @domName XMLHttpRequest.send; @docsEditable true |
| 10405 void send([data]) native; | 10104 void send([data]) native; |
| 10406 | 10105 |
| 10407 /** Sets HTTP `header` to `value`. */ | |
| 10408 /// @domName XMLHttpRequest.setRequestHeader; @docsEditable true | 10106 /// @domName XMLHttpRequest.setRequestHeader; @docsEditable true |
| 10409 void setRequestHeader(String header, String value) native; | 10107 void setRequestHeader(String header, String value) native; |
| 10410 | 10108 |
| 10411 } | 10109 } |
| 10412 | 10110 |
| 10413 /** | |
| 10414 * A class that supports listening for and dispatching events that can fire when | |
| 10415 * making an HTTP request. | |
| 10416 * | |
| 10417 * Here's an example of adding an event handler that executes once an HTTP | |
| 10418 * request has fully loaded: | |
| 10419 * | |
| 10420 * httpRequest.on.loadEnd.add((e) => myCustomLoadEndHandler(e)); | |
| 10421 * | |
| 10422 * Each property of this class is a read-only pointer to an [EventListenerList]. | |
| 10423 * That list holds all of the [EventListener]s that have registered for that | |
| 10424 * particular type of event that fires from an HttpRequest. | |
| 10425 */ | |
| 10426 /// @docsEditable true | 10111 /// @docsEditable true |
| 10427 class HttpRequestEvents extends Events { | 10112 class HttpRequestEvents extends Events { |
| 10428 /// @docsEditable true | 10113 /// @docsEditable true |
| 10429 HttpRequestEvents(EventTarget _ptr) : super(_ptr); | 10114 HttpRequestEvents(EventTarget _ptr) : super(_ptr); |
| 10430 | 10115 |
| 10431 /** | |
| 10432 * Event listeners to be notified when request has been aborted, | |
| 10433 * generally due to calling `httpRequest.abort()`. | |
| 10434 */ | |
| 10435 /// @docsEditable true | 10116 /// @docsEditable true |
| 10436 EventListenerList get abort => this['abort']; | 10117 EventListenerList get abort => this['abort']; |
| 10437 | 10118 |
| 10438 /** | |
| 10439 * Event listeners to be notified when a request has failed, such as when a | |
| 10440 * cross-domain error occurred or the file wasn't found on the server. | |
| 10441 */ | |
| 10442 /// @docsEditable true | 10119 /// @docsEditable true |
| 10443 EventListenerList get error => this['error']; | 10120 EventListenerList get error => this['error']; |
| 10444 | 10121 |
| 10445 /** | |
| 10446 * Event listeners to be notified once the request has completed | |
| 10447 * *successfully*. | |
| 10448 */ | |
| 10449 /// @docsEditable true | 10122 /// @docsEditable true |
| 10450 EventListenerList get load => this['load']; | 10123 EventListenerList get load => this['load']; |
| 10451 | 10124 |
| 10452 /** | |
| 10453 * Event listeners to be notified once the request has completed (on | |
| 10454 * either success or failure). | |
| 10455 */ | |
| 10456 /// @docsEditable true | 10125 /// @docsEditable true |
| 10457 EventListenerList get loadEnd => this['loadend']; | 10126 EventListenerList get loadEnd => this['loadend']; |
| 10458 | 10127 |
| 10459 /** | |
| 10460 * Event listeners to be notified when the request starts, once | |
| 10461 * `httpRequest.send()` has been called. | |
| 10462 */ | |
| 10463 /// @docsEditable true | 10128 /// @docsEditable true |
| 10464 EventListenerList get loadStart => this['loadstart']; | 10129 EventListenerList get loadStart => this['loadstart']; |
| 10465 | 10130 |
| 10466 /** | |
| 10467 * Event listeners to be notified when data for the request | |
| 10468 * is being sent or loaded. | |
| 10469 * | |
| 10470 * Progress events are fired every 50ms or for every byte transmitted, | |
| 10471 * whichever is less frequent. | |
| 10472 */ | |
| 10473 /// @docsEditable true | 10131 /// @docsEditable true |
| 10474 EventListenerList get progress => this['progress']; | 10132 EventListenerList get progress => this['progress']; |
| 10475 | 10133 |
| 10476 /** | |
| 10477 * Event listeners to be notified every time the [HttpRequest] | |
| 10478 * object's `readyState` changes values. | |
| 10479 */ | |
| 10480 /// @docsEditable true | 10134 /// @docsEditable true |
| 10481 EventListenerList get readyStateChange => this['readystatechange']; | 10135 EventListenerList get readyStateChange => this['readystatechange']; |
| 10482 } | 10136 } |
| 10483 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 10137 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 10484 // for details. All rights reserved. Use of this source code is governed by a | 10138 // for details. All rights reserved. Use of this source code is governed by a |
| 10485 // BSD-style license that can be found in the LICENSE file. | 10139 // BSD-style license that can be found in the LICENSE file. |
| 10486 | 10140 |
| 10487 | 10141 |
| 10488 /// @domName XMLHttpRequestException; @docsEditable true | 10142 /// @domName XMLHttpRequestException; @docsEditable true |
| 10489 class HttpRequestException native "*XMLHttpRequestException" { | 10143 class HttpRequestException native "*XMLHttpRequestException" { |
| (...skipping 3056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13546 final int totalJSHeapSize; | 13200 final int totalJSHeapSize; |
| 13547 | 13201 |
| 13548 /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true | 13202 /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true |
| 13549 final int usedJSHeapSize; | 13203 final int usedJSHeapSize; |
| 13550 } | 13204 } |
| 13551 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 13205 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 13552 // for details. All rights reserved. Use of this source code is governed by a | 13206 // for details. All rights reserved. Use of this source code is governed by a |
| 13553 // BSD-style license that can be found in the LICENSE file. | 13207 // BSD-style license that can be found in the LICENSE file. |
| 13554 | 13208 |
| 13555 | 13209 |
| 13556 /** | |
| 13557 * An HTML <menu> element. | |
| 13558 * | |
| 13559 * A <menu> element represents an unordered list of menu commands. | |
| 13560 * | |
| 13561 * See also: | |
| 13562 * | |
| 13563 * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu)
from MDN. | |
| 13564 * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-e
lement) from the W3C. | |
| 13565 */ | |
| 13566 /// @domName HTMLMenuElement; @docsEditable true | 13210 /// @domName HTMLMenuElement; @docsEditable true |
| 13567 class MenuElement extends Element native "*HTMLMenuElement" { | 13211 class MenuElement extends Element native "*HTMLMenuElement" { |
| 13568 | 13212 |
| 13569 ///@docsEditable true | 13213 ///@docsEditable true |
| 13570 factory MenuElement() => document.$dom_createElement("menu"); | 13214 factory MenuElement() => document.$dom_createElement("menu"); |
| 13571 } | 13215 } |
| 13572 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 13216 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 13573 // for details. All rights reserved. Use of this source code is governed by a | 13217 // for details. All rights reserved. Use of this source code is governed by a |
| 13574 // BSD-style license that can be found in the LICENSE file. | 13218 // BSD-style license that can be found in the LICENSE file. |
| 13575 | 13219 |
| (...skipping 12330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 25906 T next() { | 25550 T next() { |
| 25907 if (!hasNext) { | 25551 if (!hasNext) { |
| 25908 throw new StateError("No more elements"); | 25552 throw new StateError("No more elements"); |
| 25909 } | 25553 } |
| 25910 return _array[_pos++]; | 25554 return _array[_pos++]; |
| 25911 } | 25555 } |
| 25912 | 25556 |
| 25913 final List<T> _array; | 25557 final List<T> _array; |
| 25914 int _pos; | 25558 int _pos; |
| 25915 } | 25559 } |
| OLD | NEW |