| OLD | NEW |
| 1 /// The Dart HTML library. | 1 /// The Dart HTML library. |
| 2 library dart.dom.html; | 2 library dart.dom.html; |
| 3 | 3 |
| 4 import 'dart:async'; | 4 import 'dart:async'; |
| 5 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 import 'dart:_collection-dev'; | 6 import 'dart:_collection-dev'; |
| 7 import 'dart:html_common'; | 7 import 'dart:html_common'; |
| 8 import 'dart:indexed_db'; | 8 import 'dart:indexed_db'; |
| 9 import 'dart:isolate'; | 9 import 'dart:isolate'; |
| 10 import 'dart:json' as json; | 10 import 'dart:json' as json; |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 @DocsEditable | 180 @DocsEditable |
| 181 String toString() native; | 181 String toString() native; |
| 182 } | 182 } |
| 183 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 183 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 184 // for details. All rights reserved. Use of this source code is governed by a | 184 // for details. All rights reserved. Use of this source code is governed by a |
| 185 // BSD-style license that can be found in the LICENSE file. | 185 // BSD-style license that can be found in the LICENSE file. |
| 186 | 186 |
| 187 | 187 |
| 188 @DocsEditable | 188 @DocsEditable |
| 189 @DomName('WebKitAnimationEvent') | 189 @DomName('WebKitAnimationEvent') |
| 190 @SupportedBrowser(SupportedBrowser.CHROME) |
| 191 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 192 @Experimental |
| 190 class AnimationEvent extends Event native "WebKitAnimationEvent" { | 193 class AnimationEvent extends Event native "WebKitAnimationEvent" { |
| 191 | 194 |
| 192 @DomName('AnimationEvent.animationName') | 195 @DomName('AnimationEvent.animationName') |
| 193 @DocsEditable | 196 @DocsEditable |
| 194 final String animationName; | 197 final String animationName; |
| 195 | 198 |
| 196 @DomName('AnimationEvent.elapsedTime') | 199 @DomName('AnimationEvent.elapsedTime') |
| 197 @DocsEditable | 200 @DocsEditable |
| 198 final num elapsedTime; | 201 final num elapsedTime; |
| 199 } | 202 } |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 978 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 976 // for details. All rights reserved. Use of this source code is governed by a | 979 // for details. All rights reserved. Use of this source code is governed by a |
| 977 // BSD-style license that can be found in the LICENSE file. | 980 // BSD-style license that can be found in the LICENSE file. |
| 978 | 981 |
| 979 | 982 |
| 980 @DomName('CanvasRenderingContext2D') | 983 @DomName('CanvasRenderingContext2D') |
| 981 class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
eringContext2D" { | 984 class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
eringContext2D" { |
| 982 | 985 |
| 983 @DomName('CanvasRenderingContext2D.currentPath') | 986 @DomName('CanvasRenderingContext2D.currentPath') |
| 984 @DocsEditable | 987 @DocsEditable |
| 985 DomPath currentPath; | 988 Path currentPath; |
| 986 | 989 |
| 987 @DomName('CanvasRenderingContext2D.fillStyle') | 990 @DomName('CanvasRenderingContext2D.fillStyle') |
| 988 @DocsEditable | 991 @DocsEditable |
| 989 @Creates('String|CanvasGradient|CanvasPattern') | 992 @Creates('String|CanvasGradient|CanvasPattern') |
| 990 @Returns('String|CanvasGradient|CanvasPattern') | 993 @Returns('String|CanvasGradient|CanvasPattern') |
| 991 dynamic fillStyle; | 994 dynamic fillStyle; |
| 992 | 995 |
| 993 @DomName('CanvasRenderingContext2D.font') | 996 @DomName('CanvasRenderingContext2D.font') |
| 994 @DocsEditable | 997 @DocsEditable |
| 995 String font; | 998 String font; |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1819 @DomName('CSSCharsetRule.encoding') | 1822 @DomName('CSSCharsetRule.encoding') |
| 1820 @DocsEditable | 1823 @DocsEditable |
| 1821 String encoding; | 1824 String encoding; |
| 1822 } | 1825 } |
| 1823 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1826 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1824 // for details. All rights reserved. Use of this source code is governed by a | 1827 // for details. All rights reserved. Use of this source code is governed by a |
| 1825 // BSD-style license that can be found in the LICENSE file. | 1828 // BSD-style license that can be found in the LICENSE file. |
| 1826 | 1829 |
| 1827 | 1830 |
| 1828 @DocsEditable | 1831 @DocsEditable |
| 1832 @DomName('WebKitCSSFilterRule') |
| 1833 @SupportedBrowser(SupportedBrowser.CHROME) |
| 1834 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 1835 @Experimental |
| 1836 class CssFilterRule extends CssRule native "WebKitCSSFilterRule" { |
| 1837 |
| 1838 @DomName('WebKitCSSFilterRule.style') |
| 1839 @DocsEditable |
| 1840 final CssStyleDeclaration style; |
| 1841 } |
| 1842 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1843 // for details. All rights reserved. Use of this source code is governed by a |
| 1844 // BSD-style license that can be found in the LICENSE file. |
| 1845 |
| 1846 |
| 1847 @DocsEditable |
| 1829 @DomName('CSSFontFaceLoadEvent') | 1848 @DomName('CSSFontFaceLoadEvent') |
| 1830 class CssFontFaceLoadEvent extends Event native "CSSFontFaceLoadEvent" { | 1849 class CssFontFaceLoadEvent extends Event native "CSSFontFaceLoadEvent" { |
| 1831 | 1850 |
| 1832 @DomName('CSSFontFaceLoadEvent.error') | 1851 @DomName('CSSFontFaceLoadEvent.error') |
| 1833 @DocsEditable | 1852 @DocsEditable |
| 1834 final DomError error; | 1853 final DomError error; |
| 1835 | 1854 |
| 1836 @DomName('CSSFontFaceLoadEvent.fontface') | 1855 @DomName('CSSFontFaceLoadEvent.fontface') |
| 1837 @DocsEditable | 1856 @DocsEditable |
| 1838 final CssFontFaceRule fontface; | 1857 final CssFontFaceRule fontface; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1896 @DocsEditable | 1915 @DocsEditable |
| 1897 final CssStyleSheet styleSheet; | 1916 final CssStyleSheet styleSheet; |
| 1898 } | 1917 } |
| 1899 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1918 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1900 // for details. All rights reserved. Use of this source code is governed by a | 1919 // for details. All rights reserved. Use of this source code is governed by a |
| 1901 // BSD-style license that can be found in the LICENSE file. | 1920 // BSD-style license that can be found in the LICENSE file. |
| 1902 | 1921 |
| 1903 | 1922 |
| 1904 @DocsEditable | 1923 @DocsEditable |
| 1905 @DomName('WebKitCSSKeyframeRule') | 1924 @DomName('WebKitCSSKeyframeRule') |
| 1925 @SupportedBrowser(SupportedBrowser.CHROME) |
| 1926 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 1927 @Experimental |
| 1906 class CssKeyframeRule extends CssRule native "WebKitCSSKeyframeRule" { | 1928 class CssKeyframeRule extends CssRule native "WebKitCSSKeyframeRule" { |
| 1907 | 1929 |
| 1908 @DomName('WebKitCSSKeyframeRule.keyText') | 1930 @DomName('WebKitCSSKeyframeRule.keyText') |
| 1909 @DocsEditable | 1931 @DocsEditable |
| 1910 String keyText; | 1932 String keyText; |
| 1911 | 1933 |
| 1912 @DomName('WebKitCSSKeyframeRule.style') | 1934 @DomName('WebKitCSSKeyframeRule.style') |
| 1913 @DocsEditable | 1935 @DocsEditable |
| 1914 final CssStyleDeclaration style; | 1936 final CssStyleDeclaration style; |
| 1915 } | 1937 } |
| 1916 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1938 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1917 // for details. All rights reserved. Use of this source code is governed by a | 1939 // for details. All rights reserved. Use of this source code is governed by a |
| 1918 // BSD-style license that can be found in the LICENSE file. | 1940 // BSD-style license that can be found in the LICENSE file. |
| 1919 | 1941 |
| 1920 | 1942 |
| 1921 @DocsEditable | 1943 @DocsEditable |
| 1922 @DomName('WebKitCSSKeyframesRule') | 1944 @DomName('WebKitCSSKeyframesRule') |
| 1945 @SupportedBrowser(SupportedBrowser.CHROME) |
| 1946 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 1947 @Experimental |
| 1923 class CssKeyframesRule extends CssRule native "WebKitCSSKeyframesRule" { | 1948 class CssKeyframesRule extends CssRule native "WebKitCSSKeyframesRule" { |
| 1924 | 1949 |
| 1925 @DomName('WebKitCSSKeyframesRule.cssRules') | 1950 @DomName('WebKitCSSKeyframesRule.cssRules') |
| 1926 @DocsEditable | 1951 @DocsEditable |
| 1927 @Returns('_CssRuleList') | 1952 @Returns('_CssRuleList') |
| 1928 @Creates('_CssRuleList') | 1953 @Creates('_CssRuleList') |
| 1929 final List<CssRule> cssRules; | 1954 final List<CssRule> cssRules; |
| 1930 | 1955 |
| 1931 @DomName('WebKitCSSKeyframesRule.name') | 1956 @DomName('WebKitCSSKeyframesRule.name') |
| 1932 @DocsEditable | 1957 @DocsEditable |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1987 @DomName('CSSPageRule.style') | 2012 @DomName('CSSPageRule.style') |
| 1988 @DocsEditable | 2013 @DocsEditable |
| 1989 final CssStyleDeclaration style; | 2014 final CssStyleDeclaration style; |
| 1990 } | 2015 } |
| 1991 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2016 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 1992 // for details. All rights reserved. Use of this source code is governed by a | 2017 // for details. All rights reserved. Use of this source code is governed by a |
| 1993 // BSD-style license that can be found in the LICENSE file. | 2018 // BSD-style license that can be found in the LICENSE file. |
| 1994 | 2019 |
| 1995 | 2020 |
| 1996 @DocsEditable | 2021 @DocsEditable |
| 2022 @DomName('WebKitCSSRegionRule') |
| 2023 @SupportedBrowser(SupportedBrowser.CHROME) |
| 2024 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 2025 @Experimental |
| 2026 class CssRegionRule extends CssRule native "WebKitCSSRegionRule" { |
| 2027 |
| 2028 @DomName('WebKitCSSRegionRule.cssRules') |
| 2029 @DocsEditable |
| 2030 @Returns('_CssRuleList') |
| 2031 @Creates('_CssRuleList') |
| 2032 final List<CssRule> cssRules; |
| 2033 } |
| 2034 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2035 // for details. All rights reserved. Use of this source code is governed by a |
| 2036 // BSD-style license that can be found in the LICENSE file. |
| 2037 |
| 2038 |
| 2039 @DocsEditable |
| 1997 @DomName('CSSRule') | 2040 @DomName('CSSRule') |
| 1998 class CssRule native "CSSRule" { | 2041 class CssRule native "CSSRule" { |
| 1999 | 2042 |
| 2000 static const int CHARSET_RULE = 2; | 2043 static const int CHARSET_RULE = 2; |
| 2001 | 2044 |
| 2002 static const int FONT_FACE_RULE = 5; | 2045 static const int FONT_FACE_RULE = 5; |
| 2003 | 2046 |
| 2004 static const int HOST_RULE = 1001; | 2047 static const int HOST_RULE = 1001; |
| 2005 | 2048 |
| 2006 static const int IMPORT_RULE = 3; | 2049 static const int IMPORT_RULE = 3; |
| (...skipping 4027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6034 final String readyState; | 6077 final String readyState; |
| 6035 | 6078 |
| 6036 @JSName('referrer') | 6079 @JSName('referrer') |
| 6037 /// Moved to [HtmlDocument]. | 6080 /// Moved to [HtmlDocument]. |
| 6038 @DomName('Document.referrer') | 6081 @DomName('Document.referrer') |
| 6039 @DocsEditable | 6082 @DocsEditable |
| 6040 final String $dom_referrer; | 6083 final String $dom_referrer; |
| 6041 | 6084 |
| 6042 @DomName('Document.securityPolicy') | 6085 @DomName('Document.securityPolicy') |
| 6043 @DocsEditable | 6086 @DocsEditable |
| 6044 final DomSecurityPolicy securityPolicy; | 6087 final SecurityPolicy securityPolicy; |
| 6045 | 6088 |
| 6046 @JSName('selectedStylesheetSet') | 6089 @JSName('selectedStylesheetSet') |
| 6047 @DomName('Document.selectedStylesheetSet') | 6090 @DomName('Document.selectedStylesheetSet') |
| 6048 @DocsEditable | 6091 @DocsEditable |
| 6049 String $dom_selectedStylesheetSet; | 6092 String $dom_selectedStylesheetSet; |
| 6050 | 6093 |
| 6051 @JSName('styleSheets') | 6094 @JSName('styleSheets') |
| 6052 /// Moved to [HtmlDocument] | 6095 /// Moved to [HtmlDocument] |
| 6053 @DomName('Document.styleSheets') | 6096 @DomName('Document.styleSheets') |
| 6054 @DocsEditable | 6097 @DocsEditable |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6294 @SupportedBrowser(SupportedBrowser.SAFARI) | 6337 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 6295 @Experimental | 6338 @Experimental |
| 6296 void $dom_webkitExitPointerLock() native; | 6339 void $dom_webkitExitPointerLock() native; |
| 6297 | 6340 |
| 6298 @JSName('webkitGetNamedFlows') | 6341 @JSName('webkitGetNamedFlows') |
| 6299 @DomName('Document.webkitGetNamedFlows') | 6342 @DomName('Document.webkitGetNamedFlows') |
| 6300 @DocsEditable | 6343 @DocsEditable |
| 6301 @SupportedBrowser(SupportedBrowser.CHROME) | 6344 @SupportedBrowser(SupportedBrowser.CHROME) |
| 6302 @SupportedBrowser(SupportedBrowser.SAFARI) | 6345 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 6303 @Experimental | 6346 @Experimental |
| 6304 DomNamedFlowCollection getNamedFlows() native; | 6347 NamedFlowCollection getNamedFlows() native; |
| 6305 | 6348 |
| 6306 @DomName('Document.webkitRegister') | 6349 @DomName('Document.webkitRegister') |
| 6307 @DocsEditable | 6350 @DocsEditable |
| 6308 @SupportedBrowser(SupportedBrowser.CHROME) | 6351 @SupportedBrowser(SupportedBrowser.CHROME) |
| 6309 @SupportedBrowser(SupportedBrowser.SAFARI) | 6352 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 6310 @Experimental | 6353 @Experimental |
| 6311 CustomElementConstructor register(String name, [Map options]) { | 6354 CustomElementConstructor register(String name, [Map options]) { |
| 6312 if (?options) { | 6355 if (?options) { |
| 6313 var options_1 = convertDartToNative_Dictionary(options); | 6356 var options_1 = convertDartToNative_Dictionary(options); |
| 6314 return _register_1(name, options_1); | 6357 return _register_1(name, options_1); |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6737 @DomName('DOMImplementation.hasFeature') | 6780 @DomName('DOMImplementation.hasFeature') |
| 6738 @DocsEditable | 6781 @DocsEditable |
| 6739 bool hasFeature(String feature, String version) native; | 6782 bool hasFeature(String feature, String version) native; |
| 6740 } | 6783 } |
| 6741 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6784 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 6742 // for details. All rights reserved. Use of this source code is governed by a | 6785 // for details. All rights reserved. Use of this source code is governed by a |
| 6743 // BSD-style license that can be found in the LICENSE file. | 6786 // BSD-style license that can be found in the LICENSE file. |
| 6744 | 6787 |
| 6745 | 6788 |
| 6746 @DocsEditable | 6789 @DocsEditable |
| 6747 @DomName('MimeType') | 6790 @DomName('DOMParser') |
| 6748 class DomMimeType native "MimeType" { | 6791 class DomParser native "DOMParser" { |
| 6749 | 6792 |
| 6750 @DomName('DOMMimeType.description') | 6793 @DomName('DOMParser.DOMParser') |
| 6751 @DocsEditable | 6794 @DocsEditable |
| 6752 final String description; | 6795 factory DomParser() { |
| 6796 return DomParser._create_1(); |
| 6797 } |
| 6798 static DomParser _create_1() => JS('DomParser', 'new DOMParser()'); |
| 6753 | 6799 |
| 6754 @DomName('DOMMimeType.enabledPlugin') | 6800 @DomName('DOMParser.parseFromString') |
| 6755 @DocsEditable | 6801 @DocsEditable |
| 6756 final DomPlugin enabledPlugin; | 6802 Document parseFromString(String str, String contentType) native; |
| 6757 | |
| 6758 @DomName('DOMMimeType.suffixes') | |
| 6759 @DocsEditable | |
| 6760 final String suffixes; | |
| 6761 | |
| 6762 @DomName('DOMMimeType.type') | |
| 6763 @DocsEditable | |
| 6764 final String type; | |
| 6765 } | 6803 } |
| 6766 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 6804 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 6767 // for details. All rights reserved. Use of this source code is governed by a | 6805 // for details. All rights reserved. Use of this source code is governed by a |
| 6806 // BSD-style license that can be found in the LICENSE file. |
| 6807 |
| 6808 |
| 6809 @DocsEditable |
| 6810 @DomName('DOMSettableTokenList') |
| 6811 class DomSettableTokenList extends DomTokenList native "DOMSettableTokenList" { |
| 6812 |
| 6813 @DomName('DOMSettableTokenList.value') |
| 6814 @DocsEditable |
| 6815 String value; |
| 6816 } |
| 6817 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 6818 // for details. All rights reserved. Use of this source code is governed by a |
| 6768 // BSD-style license that can be found in the LICENSE file. | 6819 // BSD-style license that can be found in the LICENSE file. |
| 6769 | 6820 |
| 6770 | 6821 |
| 6771 @DocsEditable | 6822 @DocsEditable |
| 6772 @DomName('MimeTypeArray') | 6823 @DomName('DOMStringList') |
| 6773 class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType>
native "MimeTypeArray" { | 6824 class DomStringList implements JavaScriptIndexingBehavior, List<String> native "
DOMStringList" { |
| 6774 | 6825 |
| 6775 @DomName('DOMMimeTypeArray.length') | 6826 @DomName('DOMStringList.length') |
| 6776 @DocsEditable | 6827 @DocsEditable |
| 6777 int get length => JS("int", "#.length", this); | 6828 int get length => JS("int", "#.length", this); |
| 6778 | 6829 |
| 6779 DomMimeType operator[](int index) => JS("DomMimeType", "#[#]", this, index); | 6830 String operator[](int index) => JS("String", "#[#]", this, index); |
| 6780 | 6831 |
| 6781 void operator[]=(int index, DomMimeType value) { | 6832 void operator[]=(int index, String value) { |
| 6782 throw new UnsupportedError("Cannot assign element of immutable List."); | 6833 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 6783 } | 6834 } |
| 6784 // -- start List<DomMimeType> mixins. | 6835 // -- start List<String> mixins. |
| 6785 // DomMimeType is the element type. | 6836 // String is the element type. |
| 6786 | 6837 |
| 6787 // From Iterable<DomMimeType>: | 6838 // From Iterable<String>: |
| 6788 | 6839 |
| 6789 Iterator<DomMimeType> get iterator { | 6840 Iterator<String> get iterator { |
| 6790 // Note: NodeLists are not fixed size. And most probably length shouldn't | 6841 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 6791 // be cached in both iterator _and_ forEach method. For now caching it | 6842 // be cached in both iterator _and_ forEach method. For now caching it |
| 6792 // for consistency. | 6843 // for consistency. |
| 6793 return new FixedSizeListIterator<DomMimeType>(this); | 6844 return new FixedSizeListIterator<String>(this); |
| 6794 } | 6845 } |
| 6795 | 6846 |
| 6796 DomMimeType reduce(DomMimeType combine(DomMimeType value, DomMimeType element)
) { | 6847 String reduce(String combine(String value, String element)) { |
| 6797 return IterableMixinWorkaround.reduce(this, combine); | 6848 return IterableMixinWorkaround.reduce(this, combine); |
| 6798 } | 6849 } |
| 6799 | 6850 |
| 6800 dynamic fold(dynamic initialValue, | 6851 dynamic fold(dynamic initialValue, |
| 6801 dynamic combine(dynamic previousValue, DomMimeType element)) { | 6852 dynamic combine(dynamic previousValue, String element)) { |
| 6802 return IterableMixinWorkaround.fold(this, initialValue, combine); | 6853 return IterableMixinWorkaround.fold(this, initialValue, combine); |
| 6803 } | 6854 } |
| 6804 | 6855 |
| 6805 bool contains(DomMimeType element) => IterableMixinWorkaround.contains(this, e
lement); | 6856 // contains() defined by IDL. |
| 6806 | 6857 |
| 6807 void forEach(void f(DomMimeType element)) => IterableMixinWorkaround.forEach(t
his, f); | 6858 void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this,
f); |
| 6808 | 6859 |
| 6809 String join([String separator = ""]) => | 6860 String join([String separator = ""]) => |
| 6810 IterableMixinWorkaround.joinList(this, separator); | 6861 IterableMixinWorkaround.joinList(this, separator); |
| 6811 | 6862 |
| 6812 Iterable map(f(DomMimeType element)) => | 6863 Iterable map(f(String element)) => |
| 6813 IterableMixinWorkaround.mapList(this, f); | 6864 IterableMixinWorkaround.mapList(this, f); |
| 6814 | 6865 |
| 6815 Iterable<DomMimeType> where(bool f(DomMimeType element)) => | 6866 Iterable<String> where(bool f(String element)) => |
| 6816 IterableMixinWorkaround.where(this, f); | 6867 IterableMixinWorkaround.where(this, f); |
| 6817 | 6868 |
| 6818 Iterable expand(Iterable f(DomMimeType element)) => | 6869 Iterable expand(Iterable f(String element)) => |
| 6819 IterableMixinWorkaround.expand(this, f); | 6870 IterableMixinWorkaround.expand(this, f); |
| 6820 | 6871 |
| 6821 bool every(bool f(DomMimeType element)) => IterableMixinWorkaround.every(this,
f); | 6872 bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f); |
| 6822 | 6873 |
| 6823 bool any(bool f(DomMimeType element)) => IterableMixinWorkaround.any(this, f); | 6874 bool any(bool f(String element)) => IterableMixinWorkaround.any(this, f); |
| 6824 | 6875 |
| 6825 List<DomMimeType> toList({ bool growable: true }) => | 6876 List<String> toList({ bool growable: true }) => |
| 6826 new List<DomMimeType>.from(this, growable: growable); | 6877 new List<String>.from(this, growable: growable); |
| 6827 | 6878 |
| 6828 Set<DomMimeType> toSet() => new Set<DomMimeType>.from(this); | 6879 Set<String> toSet() => new Set<String>.from(this); |
| 6829 | 6880 |
| 6830 bool get isEmpty => this.length == 0; | 6881 bool get isEmpty => this.length == 0; |
| 6831 | 6882 |
| 6832 Iterable<DomMimeType> take(int n) => IterableMixinWorkaround.takeList(this, n)
; | 6883 Iterable<String> take(int n) => IterableMixinWorkaround.takeList(this, n); |
| 6833 | 6884 |
| 6834 Iterable<DomMimeType> takeWhile(bool test(DomMimeType value)) { | 6885 Iterable<String> takeWhile(bool test(String value)) { |
| 6835 return IterableMixinWorkaround.takeWhile(this, test); | 6886 return IterableMixinWorkaround.takeWhile(this, test); |
| 6836 } | 6887 } |
| 6837 | 6888 |
| 6838 Iterable<DomMimeType> skip(int n) => IterableMixinWorkaround.skipList(this, n)
; | 6889 Iterable<String> skip(int n) => IterableMixinWorkaround.skipList(this, n); |
| 6839 | 6890 |
| 6840 Iterable<DomMimeType> skipWhile(bool test(DomMimeType value)) { | 6891 Iterable<String> skipWhile(bool test(String value)) { |
| 6841 return IterableMixinWorkaround.skipWhile(this, test); | 6892 return IterableMixinWorkaround.skipWhile(this, test); |
| 6842 } | 6893 } |
| 6843 | 6894 |
| 6844 DomMimeType firstWhere(bool test(DomMimeType value), { DomMimeType orElse() })
{ | 6895 String firstWhere(bool test(String value), { String orElse() }) { |
| 6845 return IterableMixinWorkaround.firstWhere(this, test, orElse); | 6896 return IterableMixinWorkaround.firstWhere(this, test, orElse); |
| 6846 } | 6897 } |
| 6847 | 6898 |
| 6848 DomMimeType lastWhere(bool test(DomMimeType value), {DomMimeType orElse()}) { | 6899 String lastWhere(bool test(String value), {String orElse()}) { |
| 6849 return IterableMixinWorkaround.lastWhereList(this, test, orElse); | 6900 return IterableMixinWorkaround.lastWhereList(this, test, orElse); |
| 6850 } | 6901 } |
| 6851 | 6902 |
| 6852 DomMimeType singleWhere(bool test(DomMimeType value)) { | 6903 String singleWhere(bool test(String value)) { |
| 6853 return IterableMixinWorkaround.singleWhere(this, test); | 6904 return IterableMixinWorkaround.singleWhere(this, test); |
| 6854 } | 6905 } |
| 6855 | 6906 |
| 6856 DomMimeType elementAt(int index) { | 6907 String elementAt(int index) { |
| 6857 return this[index]; | 6908 return this[index]; |
| 6858 } | 6909 } |
| 6859 | 6910 |
| 6860 // From Collection<DomMimeType>: | 6911 // From Collection<String>: |
| 6861 | 6912 |
| 6862 void add(DomMimeType value) { | 6913 void add(String value) { |
| 6863 throw new UnsupportedError("Cannot add to immutable List."); | 6914 throw new UnsupportedError("Cannot add to immutable List."); |
| 6864 } | 6915 } |
| 6865 | 6916 |
| 6866 void addAll(Iterable<DomMimeType> iterable) { | 6917 void addAll(Iterable<String> iterable) { |
| 6867 throw new UnsupportedError("Cannot add to immutable List."); | 6918 throw new UnsupportedError("Cannot add to immutable List."); |
| 6868 } | 6919 } |
| 6869 | 6920 |
| 6870 // From List<DomMimeType>: | 6921 // From List<String>: |
| 6871 void set length(int value) { | 6922 void set length(int value) { |
| 6872 throw new UnsupportedError("Cannot resize immutable List."); | 6923 throw new UnsupportedError("Cannot resize immutable List."); |
| 6873 } | 6924 } |
| 6874 | 6925 |
| 6875 void clear() { | 6926 void clear() { |
| 6876 throw new UnsupportedError("Cannot clear immutable List."); | 6927 throw new UnsupportedError("Cannot clear immutable List."); |
| 6877 } | 6928 } |
| 6878 | 6929 |
| 6879 Iterable<DomMimeType> get reversed { | 6930 Iterable<String> get reversed { |
| 6880 return IterableMixinWorkaround.reversedList(this); | 6931 return IterableMixinWorkaround.reversedList(this); |
| 6881 } | 6932 } |
| 6882 | 6933 |
| 6883 void sort([int compare(DomMimeType a, DomMimeType b)]) { | 6934 void sort([int compare(String a, String b)]) { |
| 6884 throw new UnsupportedError("Cannot sort immutable List."); | 6935 throw new UnsupportedError("Cannot sort immutable List."); |
| 6885 } | 6936 } |
| 6886 | 6937 |
| 6887 int indexOf(DomMimeType element, [int start = 0]) => | 6938 int indexOf(String element, [int start = 0]) => |
| 6888 Lists.indexOf(this, element, start, this.length); | 6939 Lists.indexOf(this, element, start, this.length); |
| 6889 | 6940 |
| 6890 int lastIndexOf(DomMimeType element, [int start]) { | 6941 int lastIndexOf(String element, [int start]) { |
| 6891 if (start == null) start = length - 1; | 6942 if (start == null) start = length - 1; |
| 6892 return Lists.lastIndexOf(this, element, start); | 6943 return Lists.lastIndexOf(this, element, start); |
| 6893 } | 6944 } |
| 6894 | 6945 |
| 6895 DomMimeType get first { | 6946 String get first { |
| 6896 if (this.length > 0) return this[0]; | 6947 if (this.length > 0) return this[0]; |
| 6897 throw new StateError("No elements"); | 6948 throw new StateError("No elements"); |
| 6898 } | 6949 } |
| 6899 | 6950 |
| 6900 DomMimeType get last { | 6951 String get last { |
| 6901 if (this.length > 0) return this[this.length - 1]; | 6952 if (this.length > 0) return this[this.length - 1]; |
| 6902 throw new StateError("No elements"); | 6953 throw new StateError("No elements"); |
| 6903 } | 6954 } |
| 6904 | 6955 |
| 6905 DomMimeType get single { | 6956 String get single { |
| 6906 if (length == 1) return this[0]; | 6957 if (length == 1) return this[0]; |
| 6907 if (length == 0) throw new StateError("No elements"); | 6958 if (length == 0) throw new StateError("No elements"); |
| 6908 throw new StateError("More than one element"); | 6959 throw new StateError("More than one element"); |
| 6909 } | 6960 } |
| 6910 | 6961 |
| 6911 void insert(int index, DomMimeType element) { | 6962 void insert(int index, String element) { |
| 6912 throw new UnsupportedError("Cannot add to immutable List."); | 6963 throw new UnsupportedError("Cannot add to immutable List."); |
| 6913 } | 6964 } |
| 6914 | 6965 |
| 6915 void insertAll(int index, Iterable<DomMimeType> iterable) { | 6966 void insertAll(int index, Iterable<String> iterable) { |
| 6916 throw new UnsupportedError("Cannot add to immutable List."); | 6967 throw new UnsupportedError("Cannot add to immutable List."); |
| 6917 } | 6968 } |
| 6918 | 6969 |
| 6919 void setAll(int index, Iterable<DomMimeType> iterable) { | 6970 void setAll(int index, Iterable<String> iterable) { |
| 6920 throw new UnsupportedError("Cannot modify an immutable List."); | 6971 throw new UnsupportedError("Cannot modify an immutable List."); |
| 6921 } | 6972 } |
| 6922 | 6973 |
| 6923 DomMimeType removeAt(int pos) { | 6974 String removeAt(int pos) { |
| 6924 throw new UnsupportedError("Cannot remove from immutable List."); | 6975 throw new UnsupportedError("Cannot remove from immutable List."); |
| 6925 } | 6976 } |
| 6926 | 6977 |
| 6927 DomMimeType removeLast() { | 6978 String removeLast() { |
| 6928 throw new UnsupportedError("Cannot remove from immutable List."); | 6979 throw new UnsupportedError("Cannot remove from immutable List."); |
| 6929 } | 6980 } |
| 6930 | 6981 |
| 6931 bool remove(Object object) { | 6982 bool remove(Object object) { |
| 6932 throw new UnsupportedError("Cannot remove from immutable List."); | 6983 throw new UnsupportedError("Cannot remove from immutable List."); |
| 6933 } | 6984 } |
| 6934 | 6985 |
| 6935 void removeWhere(bool test(DomMimeType element)) { | 6986 void removeWhere(bool test(String element)) { |
| 6936 throw new UnsupportedError("Cannot remove from immutable List."); | 6987 throw new UnsupportedError("Cannot remove from immutable List."); |
| 6937 } | 6988 } |
| 6938 | 6989 |
| 6939 void retainWhere(bool test(DomMimeType element)) { | 6990 void retainWhere(bool test(String element)) { |
| 6940 throw new UnsupportedError("Cannot remove from immutable List."); | 6991 throw new UnsupportedError("Cannot remove from immutable List."); |
| 6941 } | 6992 } |
| 6942 | 6993 |
| 6943 void setRange(int start, int end, Iterable<DomMimeType> iterable, [int skipCou
nt=0]) { | 6994 void setRange(int start, int end, Iterable<String> iterable, [int skipCount=0]
) { |
| 6944 throw new UnsupportedError("Cannot setRange on immutable List."); | 6995 throw new UnsupportedError("Cannot setRange on immutable List."); |
| 6945 } | 6996 } |
| 6946 | 6997 |
| 6947 void removeRange(int start, int end) { | 6998 void removeRange(int start, int end) { |
| 6948 throw new UnsupportedError("Cannot removeRange on immutable List."); | 6999 throw new UnsupportedError("Cannot removeRange on immutable List."); |
| 6949 } | 7000 } |
| 6950 | 7001 |
| 6951 void replaceRange(int start, int end, Iterable<DomMimeType> iterable) { | 7002 void replaceRange(int start, int end, Iterable<String> iterable) { |
| 6952 throw new UnsupportedError("Cannot modify an immutable List."); | 7003 throw new UnsupportedError("Cannot modify an immutable List."); |
| 6953 } | 7004 } |
| 6954 | 7005 |
| 6955 void fillRange(int start, int end, [DomMimeType fillValue]) { | 7006 void fillRange(int start, int end, [String fillValue]) { |
| 6956 throw new UnsupportedError("Cannot modify an immutable List."); | 7007 throw new UnsupportedError("Cannot modify an immutable List."); |
| 6957 } | 7008 } |
| 6958 | 7009 |
| 6959 Iterable<DomMimeType> getRange(int start, int end) => | 7010 Iterable<String> getRange(int start, int end) => |
| 6960 IterableMixinWorkaround.getRangeList(this, start, end); | 7011 IterableMixinWorkaround.getRangeList(this, start, end); |
| 6961 | 7012 |
| 6962 List<DomMimeType> sublist(int start, [int end]) { | 7013 List<String> sublist(int start, [int end]) { |
| 6963 if (end == null) end = length; | 7014 if (end == null) end = length; |
| 6964 return Lists.getRange(this, start, end, <DomMimeType>[]); | 7015 return Lists.getRange(this, start, end, <String>[]); |
| 6965 } | 7016 } |
| 6966 | 7017 |
| 6967 Map<int, DomMimeType> asMap() => | 7018 Map<int, String> asMap() => |
| 6968 IterableMixinWorkaround.asMapList(this); | 7019 IterableMixinWorkaround.asMapList(this); |
| 6969 | 7020 |
| 6970 String toString() { | 7021 String toString() { |
| 6971 StringBuffer buffer = new StringBuffer('['); | 7022 StringBuffer buffer = new StringBuffer('['); |
| 6972 buffer.writeAll(this, ', '); | 7023 buffer.writeAll(this, ', '); |
| 6973 buffer.write(']'); | 7024 buffer.write(']'); |
| 6974 return buffer.toString(); | 7025 return buffer.toString(); |
| 6975 } | 7026 } |
| 6976 | 7027 |
| 6977 // -- end List<DomMimeType> mixins. | 7028 // -- end List<String> mixins. |
| 6978 | 7029 |
| 6979 @DomName('DOMMimeTypeArray.item') | 7030 @DomName('DOMStringList.contains') |
| 6980 @DocsEditable | 7031 @DocsEditable |
| 6981 DomMimeType item(int index) native; | 7032 bool contains(String string) native; |
| 6982 | 7033 |
| 6983 @DomName('DOMMimeTypeArray.namedItem') | 7034 @DomName('DOMStringList.item') |
| 6984 @DocsEditable | 7035 @DocsEditable |
| 6985 DomMimeType namedItem(String name) native; | 7036 String item(int index) native; |
| 6986 } | 7037 } |
| 6987 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 7038 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 6988 // for details. All rights reserved. Use of this source code is governed by a | 7039 // for details. All rights reserved. Use of this source code is governed by a |
| 6989 // BSD-style license that can be found in the LICENSE file. | 7040 // BSD-style license that can be found in the LICENSE file. |
| 6990 | 7041 |
| 6991 | 7042 |
| 6992 @DocsEditable | 7043 @DomName('DOMStringMap') |
| 6993 @DomName('WebKitNamedFlowCollection') | 7044 abstract class DomStringMap { |
| 6994 class DomNamedFlowCollection native "WebKitNamedFlowCollection" { | |
| 6995 | |
| 6996 @DomName('DOMNamedFlowCollection.length') | |
| 6997 @DocsEditable | |
| 6998 final int length; | |
| 6999 | |
| 7000 @DomName('DOMNamedFlowCollection.item') | |
| 7001 @DocsEditable | |
| 7002 NamedFlow item(int index) native; | |
| 7003 | |
| 7004 @DomName('DOMNamedFlowCollection.namedItem') | |
| 7005 @DocsEditable | |
| 7006 NamedFlow namedItem(String name) native; | |
| 7007 } | 7045 } |
| 7008 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 7046 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 7009 // for details. All rights reserved. Use of this source code is governed by a | 7047 // for details. All rights reserved. Use of this source code is governed by a |
| 7010 // BSD-style license that can be found in the LICENSE file. | |
| 7011 | |
| 7012 | |
| 7013 @DocsEditable | |
| 7014 @DomName('DOMParser') | |
| 7015 class DomParser native "DOMParser" { | |
| 7016 | |
| 7017 @DomName('DOMParser.DOMParser') | |
| 7018 @DocsEditable | |
| 7019 factory DomParser() { | |
| 7020 return DomParser._create_1(); | |
| 7021 } | |
| 7022 static DomParser _create_1() => JS('DomParser', 'new DOMParser()'); | |
| 7023 | |
| 7024 @DomName('DOMParser.parseFromString') | |
| 7025 @DocsEditable | |
| 7026 Document parseFromString(String str, String contentType) native; | |
| 7027 } | |
| 7028 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 7029 // for details. All rights reserved. Use of this source code is governed by a | |
| 7030 // BSD-style license that can be found in the LICENSE file. | 7048 // BSD-style license that can be found in the LICENSE file. |
| 7031 | 7049 |
| 7032 | 7050 |
| 7033 @DocsEditable | 7051 @DocsEditable |
| 7034 @DomName('Path') | |
| 7035 class DomPath native "Path" { | |
| 7036 | |
| 7037 @DomName('DOMPath.DOMPath') | |
| 7038 @DocsEditable | |
| 7039 factory DomPath([path_OR_text]) { | |
| 7040 if (!?path_OR_text) { | |
| 7041 return DomPath._create_1(); | |
| 7042 } | |
| 7043 if ((path_OR_text is DomPath || path_OR_text == null)) { | |
| 7044 return DomPath._create_2(path_OR_text); | |
| 7045 } | |
| 7046 if ((path_OR_text is String || path_OR_text == null)) { | |
| 7047 return DomPath._create_3(path_OR_text); | |
| 7048 } | |
| 7049 throw new ArgumentError("Incorrect number or type of arguments"); | |
| 7050 } | |
| 7051 static DomPath _create_1() => JS('DomPath', 'new Path()'); | |
| 7052 static DomPath _create_2(path_OR_text) => JS('DomPath', 'new Path(#)', path_OR
_text); | |
| 7053 static DomPath _create_3(path_OR_text) => JS('DomPath', 'new Path(#)', path_OR
_text); | |
| 7054 | |
| 7055 @DomName('DOMPath.arc') | |
| 7056 @DocsEditable | |
| 7057 void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticloc
kwise) native; | |
| 7058 | |
| 7059 @DomName('DOMPath.arcTo') | |
| 7060 @DocsEditable | |
| 7061 void arcTo(num x1, num y1, num x2, num y2, num radius) native; | |
| 7062 | |
| 7063 @DomName('DOMPath.bezierCurveTo') | |
| 7064 @DocsEditable | |
| 7065 void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) nativ
e; | |
| 7066 | |
| 7067 @DomName('DOMPath.closePath') | |
| 7068 @DocsEditable | |
| 7069 void closePath() native; | |
| 7070 | |
| 7071 @DomName('DOMPath.lineTo') | |
| 7072 @DocsEditable | |
| 7073 void lineTo(num x, num y) native; | |
| 7074 | |
| 7075 @DomName('DOMPath.moveTo') | |
| 7076 @DocsEditable | |
| 7077 void moveTo(num x, num y) native; | |
| 7078 | |
| 7079 @DomName('DOMPath.quadraticCurveTo') | |
| 7080 @DocsEditable | |
| 7081 void quadraticCurveTo(num cpx, num cpy, num x, num y) native; | |
| 7082 | |
| 7083 @DomName('DOMPath.rect') | |
| 7084 @DocsEditable | |
| 7085 void rect(num x, num y, num width, num height) native; | |
| 7086 } | |
| 7087 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 7088 // for details. All rights reserved. Use of this source code is governed by a | |
| 7089 // BSD-style license that can be found in the LICENSE file. | |
| 7090 | |
| 7091 | |
| 7092 @DocsEditable | |
| 7093 @DomName('Plugin') | |
| 7094 class DomPlugin native "Plugin" { | |
| 7095 | |
| 7096 @DomName('DOMPlugin.description') | |
| 7097 @DocsEditable | |
| 7098 final String description; | |
| 7099 | |
| 7100 @DomName('DOMPlugin.filename') | |
| 7101 @DocsEditable | |
| 7102 final String filename; | |
| 7103 | |
| 7104 @DomName('DOMPlugin.length') | |
| 7105 @DocsEditable | |
| 7106 final int length; | |
| 7107 | |
| 7108 @DomName('DOMPlugin.name') | |
| 7109 @DocsEditable | |
| 7110 final String name; | |
| 7111 | |
| 7112 @DomName('DOMPlugin.item') | |
| 7113 @DocsEditable | |
| 7114 DomMimeType item(int index) native; | |
| 7115 | |
| 7116 @DomName('DOMPlugin.namedItem') | |
| 7117 @DocsEditable | |
| 7118 DomMimeType namedItem(String name) native; | |
| 7119 } | |
| 7120 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 7121 // for details. All rights reserved. Use of this source code is governed by a | |
| 7122 // BSD-style license that can be found in the LICENSE file. | |
| 7123 | |
| 7124 | |
| 7125 @DocsEditable | |
| 7126 @DomName('PluginArray') | |
| 7127 class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> nati
ve "PluginArray" { | |
| 7128 | |
| 7129 @DomName('DOMPluginArray.length') | |
| 7130 @DocsEditable | |
| 7131 int get length => JS("int", "#.length", this); | |
| 7132 | |
| 7133 DomPlugin operator[](int index) => JS("DomPlugin", "#[#]", this, index); | |
| 7134 | |
| 7135 void operator[]=(int index, DomPlugin value) { | |
| 7136 throw new UnsupportedError("Cannot assign element of immutable List."); | |
| 7137 } | |
| 7138 // -- start List<DomPlugin> mixins. | |
| 7139 // DomPlugin is the element type. | |
| 7140 | |
| 7141 // From Iterable<DomPlugin>: | |
| 7142 | |
| 7143 Iterator<DomPlugin> get iterator { | |
| 7144 // Note: NodeLists are not fixed size. And most probably length shouldn't | |
| 7145 // be cached in both iterator _and_ forEach method. For now caching it | |
| 7146 // for consistency. | |
| 7147 return new FixedSizeListIterator<DomPlugin>(this); | |
| 7148 } | |
| 7149 | |
| 7150 DomPlugin reduce(DomPlugin combine(DomPlugin value, DomPlugin element)) { | |
| 7151 return IterableMixinWorkaround.reduce(this, combine); | |
| 7152 } | |
| 7153 | |
| 7154 dynamic fold(dynamic initialValue, | |
| 7155 dynamic combine(dynamic previousValue, DomPlugin element)) { | |
| 7156 return IterableMixinWorkaround.fold(this, initialValue, combine); | |
| 7157 } | |
| 7158 | |
| 7159 bool contains(DomPlugin element) => IterableMixinWorkaround.contains(this, ele
ment); | |
| 7160 | |
| 7161 void forEach(void f(DomPlugin element)) => IterableMixinWorkaround.forEach(thi
s, f); | |
| 7162 | |
| 7163 String join([String separator = ""]) => | |
| 7164 IterableMixinWorkaround.joinList(this, separator); | |
| 7165 | |
| 7166 Iterable map(f(DomPlugin element)) => | |
| 7167 IterableMixinWorkaround.mapList(this, f); | |
| 7168 | |
| 7169 Iterable<DomPlugin> where(bool f(DomPlugin element)) => | |
| 7170 IterableMixinWorkaround.where(this, f); | |
| 7171 | |
| 7172 Iterable expand(Iterable f(DomPlugin element)) => | |
| 7173 IterableMixinWorkaround.expand(this, f); | |
| 7174 | |
| 7175 bool every(bool f(DomPlugin element)) => IterableMixinWorkaround.every(this, f
); | |
| 7176 | |
| 7177 bool any(bool f(DomPlugin element)) => IterableMixinWorkaround.any(this, f); | |
| 7178 | |
| 7179 List<DomPlugin> toList({ bool growable: true }) => | |
| 7180 new List<DomPlugin>.from(this, growable: growable); | |
| 7181 | |
| 7182 Set<DomPlugin> toSet() => new Set<DomPlugin>.from(this); | |
| 7183 | |
| 7184 bool get isEmpty => this.length == 0; | |
| 7185 | |
| 7186 Iterable<DomPlugin> take(int n) => IterableMixinWorkaround.takeList(this, n); | |
| 7187 | |
| 7188 Iterable<DomPlugin> takeWhile(bool test(DomPlugin value)) { | |
| 7189 return IterableMixinWorkaround.takeWhile(this, test); | |
| 7190 } | |
| 7191 | |
| 7192 Iterable<DomPlugin> skip(int n) => IterableMixinWorkaround.skipList(this, n); | |
| 7193 | |
| 7194 Iterable<DomPlugin> skipWhile(bool test(DomPlugin value)) { | |
| 7195 return IterableMixinWorkaround.skipWhile(this, test); | |
| 7196 } | |
| 7197 | |
| 7198 DomPlugin firstWhere(bool test(DomPlugin value), { DomPlugin orElse() }) { | |
| 7199 return IterableMixinWorkaround.firstWhere(this, test, orElse); | |
| 7200 } | |
| 7201 | |
| 7202 DomPlugin lastWhere(bool test(DomPlugin value), {DomPlugin orElse()}) { | |
| 7203 return IterableMixinWorkaround.lastWhereList(this, test, orElse); | |
| 7204 } | |
| 7205 | |
| 7206 DomPlugin singleWhere(bool test(DomPlugin value)) { | |
| 7207 return IterableMixinWorkaround.singleWhere(this, test); | |
| 7208 } | |
| 7209 | |
| 7210 DomPlugin elementAt(int index) { | |
| 7211 return this[index]; | |
| 7212 } | |
| 7213 | |
| 7214 // From Collection<DomPlugin>: | |
| 7215 | |
| 7216 void add(DomPlugin value) { | |
| 7217 throw new UnsupportedError("Cannot add to immutable List."); | |
| 7218 } | |
| 7219 | |
| 7220 void addAll(Iterable<DomPlugin> iterable) { | |
| 7221 throw new UnsupportedError("Cannot add to immutable List."); | |
| 7222 } | |
| 7223 | |
| 7224 // From List<DomPlugin>: | |
| 7225 void set length(int value) { | |
| 7226 throw new UnsupportedError("Cannot resize immutable List."); | |
| 7227 } | |
| 7228 | |
| 7229 void clear() { | |
| 7230 throw new UnsupportedError("Cannot clear immutable List."); | |
| 7231 } | |
| 7232 | |
| 7233 Iterable<DomPlugin> get reversed { | |
| 7234 return IterableMixinWorkaround.reversedList(this); | |
| 7235 } | |
| 7236 | |
| 7237 void sort([int compare(DomPlugin a, DomPlugin b)]) { | |
| 7238 throw new UnsupportedError("Cannot sort immutable List."); | |
| 7239 } | |
| 7240 | |
| 7241 int indexOf(DomPlugin element, [int start = 0]) => | |
| 7242 Lists.indexOf(this, element, start, this.length); | |
| 7243 | |
| 7244 int lastIndexOf(DomPlugin element, [int start]) { | |
| 7245 if (start == null) start = length - 1; | |
| 7246 return Lists.lastIndexOf(this, element, start); | |
| 7247 } | |
| 7248 | |
| 7249 DomPlugin get first { | |
| 7250 if (this.length > 0) return this[0]; | |
| 7251 throw new StateError("No elements"); | |
| 7252 } | |
| 7253 | |
| 7254 DomPlugin get last { | |
| 7255 if (this.length > 0) return this[this.length - 1]; | |
| 7256 throw new StateError("No elements"); | |
| 7257 } | |
| 7258 | |
| 7259 DomPlugin get single { | |
| 7260 if (length == 1) return this[0]; | |
| 7261 if (length == 0) throw new StateError("No elements"); | |
| 7262 throw new StateError("More than one element"); | |
| 7263 } | |
| 7264 | |
| 7265 void insert(int index, DomPlugin element) { | |
| 7266 throw new UnsupportedError("Cannot add to immutable List."); | |
| 7267 } | |
| 7268 | |
| 7269 void insertAll(int index, Iterable<DomPlugin> iterable) { | |
| 7270 throw new UnsupportedError("Cannot add to immutable List."); | |
| 7271 } | |
| 7272 | |
| 7273 void setAll(int index, Iterable<DomPlugin> iterable) { | |
| 7274 throw new UnsupportedError("Cannot modify an immutable List."); | |
| 7275 } | |
| 7276 | |
| 7277 DomPlugin removeAt(int pos) { | |
| 7278 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7279 } | |
| 7280 | |
| 7281 DomPlugin removeLast() { | |
| 7282 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7283 } | |
| 7284 | |
| 7285 bool remove(Object object) { | |
| 7286 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7287 } | |
| 7288 | |
| 7289 void removeWhere(bool test(DomPlugin element)) { | |
| 7290 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7291 } | |
| 7292 | |
| 7293 void retainWhere(bool test(DomPlugin element)) { | |
| 7294 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7295 } | |
| 7296 | |
| 7297 void setRange(int start, int end, Iterable<DomPlugin> iterable, [int skipCount
=0]) { | |
| 7298 throw new UnsupportedError("Cannot setRange on immutable List."); | |
| 7299 } | |
| 7300 | |
| 7301 void removeRange(int start, int end) { | |
| 7302 throw new UnsupportedError("Cannot removeRange on immutable List."); | |
| 7303 } | |
| 7304 | |
| 7305 void replaceRange(int start, int end, Iterable<DomPlugin> iterable) { | |
| 7306 throw new UnsupportedError("Cannot modify an immutable List."); | |
| 7307 } | |
| 7308 | |
| 7309 void fillRange(int start, int end, [DomPlugin fillValue]) { | |
| 7310 throw new UnsupportedError("Cannot modify an immutable List."); | |
| 7311 } | |
| 7312 | |
| 7313 Iterable<DomPlugin> getRange(int start, int end) => | |
| 7314 IterableMixinWorkaround.getRangeList(this, start, end); | |
| 7315 | |
| 7316 List<DomPlugin> sublist(int start, [int end]) { | |
| 7317 if (end == null) end = length; | |
| 7318 return Lists.getRange(this, start, end, <DomPlugin>[]); | |
| 7319 } | |
| 7320 | |
| 7321 Map<int, DomPlugin> asMap() => | |
| 7322 IterableMixinWorkaround.asMapList(this); | |
| 7323 | |
| 7324 String toString() { | |
| 7325 StringBuffer buffer = new StringBuffer('['); | |
| 7326 buffer.writeAll(this, ', '); | |
| 7327 buffer.write(']'); | |
| 7328 return buffer.toString(); | |
| 7329 } | |
| 7330 | |
| 7331 // -- end List<DomPlugin> mixins. | |
| 7332 | |
| 7333 @DomName('DOMPluginArray.item') | |
| 7334 @DocsEditable | |
| 7335 DomPlugin item(int index) native; | |
| 7336 | |
| 7337 @DomName('DOMPluginArray.namedItem') | |
| 7338 @DocsEditable | |
| 7339 DomPlugin namedItem(String name) native; | |
| 7340 | |
| 7341 @DomName('DOMPluginArray.refresh') | |
| 7342 @DocsEditable | |
| 7343 void refresh(bool reload) native; | |
| 7344 } | |
| 7345 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 7346 // for details. All rights reserved. Use of this source code is governed by a | |
| 7347 // BSD-style license that can be found in the LICENSE file. | |
| 7348 | |
| 7349 | |
| 7350 @DocsEditable | |
| 7351 @DomName('SecurityPolicy') | |
| 7352 class DomSecurityPolicy native "SecurityPolicy" { | |
| 7353 | |
| 7354 @DomName('DOMSecurityPolicy.allowsEval') | |
| 7355 @DocsEditable | |
| 7356 final bool allowsEval; | |
| 7357 | |
| 7358 @DomName('DOMSecurityPolicy.allowsInlineScript') | |
| 7359 @DocsEditable | |
| 7360 final bool allowsInlineScript; | |
| 7361 | |
| 7362 @DomName('DOMSecurityPolicy.allowsInlineStyle') | |
| 7363 @DocsEditable | |
| 7364 final bool allowsInlineStyle; | |
| 7365 | |
| 7366 @DomName('DOMSecurityPolicy.isActive') | |
| 7367 @DocsEditable | |
| 7368 final bool isActive; | |
| 7369 | |
| 7370 @DomName('DOMSecurityPolicy.reportURIs') | |
| 7371 @DocsEditable | |
| 7372 @Returns('DomStringList') | |
| 7373 @Creates('DomStringList') | |
| 7374 final List<String> reportURIs; | |
| 7375 | |
| 7376 @DomName('DOMSecurityPolicy.allowsConnectionTo') | |
| 7377 @DocsEditable | |
| 7378 bool allowsConnectionTo(String url) native; | |
| 7379 | |
| 7380 @DomName('DOMSecurityPolicy.allowsFontFrom') | |
| 7381 @DocsEditable | |
| 7382 bool allowsFontFrom(String url) native; | |
| 7383 | |
| 7384 @DomName('DOMSecurityPolicy.allowsFormAction') | |
| 7385 @DocsEditable | |
| 7386 bool allowsFormAction(String url) native; | |
| 7387 | |
| 7388 @DomName('DOMSecurityPolicy.allowsFrameFrom') | |
| 7389 @DocsEditable | |
| 7390 bool allowsFrameFrom(String url) native; | |
| 7391 | |
| 7392 @DomName('DOMSecurityPolicy.allowsImageFrom') | |
| 7393 @DocsEditable | |
| 7394 bool allowsImageFrom(String url) native; | |
| 7395 | |
| 7396 @DomName('DOMSecurityPolicy.allowsMediaFrom') | |
| 7397 @DocsEditable | |
| 7398 bool allowsMediaFrom(String url) native; | |
| 7399 | |
| 7400 @DomName('DOMSecurityPolicy.allowsObjectFrom') | |
| 7401 @DocsEditable | |
| 7402 bool allowsObjectFrom(String url) native; | |
| 7403 | |
| 7404 @DomName('DOMSecurityPolicy.allowsPluginType') | |
| 7405 @DocsEditable | |
| 7406 bool allowsPluginType(String type) native; | |
| 7407 | |
| 7408 @DomName('DOMSecurityPolicy.allowsScriptFrom') | |
| 7409 @DocsEditable | |
| 7410 bool allowsScriptFrom(String url) native; | |
| 7411 | |
| 7412 @DomName('DOMSecurityPolicy.allowsStyleFrom') | |
| 7413 @DocsEditable | |
| 7414 bool allowsStyleFrom(String url) native; | |
| 7415 } | |
| 7416 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 7417 // for details. All rights reserved. Use of this source code is governed by a | |
| 7418 // BSD-style license that can be found in the LICENSE file. | |
| 7419 | |
| 7420 | |
| 7421 @DocsEditable | |
| 7422 @DomName('Selection') | |
| 7423 class DomSelection native "Selection" { | |
| 7424 | |
| 7425 @DomName('DOMSelection.anchorNode') | |
| 7426 @DocsEditable | |
| 7427 final Node anchorNode; | |
| 7428 | |
| 7429 @DomName('DOMSelection.anchorOffset') | |
| 7430 @DocsEditable | |
| 7431 final int anchorOffset; | |
| 7432 | |
| 7433 @DomName('DOMSelection.baseNode') | |
| 7434 @DocsEditable | |
| 7435 final Node baseNode; | |
| 7436 | |
| 7437 @DomName('DOMSelection.baseOffset') | |
| 7438 @DocsEditable | |
| 7439 final int baseOffset; | |
| 7440 | |
| 7441 @DomName('DOMSelection.extentNode') | |
| 7442 @DocsEditable | |
| 7443 final Node extentNode; | |
| 7444 | |
| 7445 @DomName('DOMSelection.extentOffset') | |
| 7446 @DocsEditable | |
| 7447 final int extentOffset; | |
| 7448 | |
| 7449 @DomName('DOMSelection.focusNode') | |
| 7450 @DocsEditable | |
| 7451 final Node focusNode; | |
| 7452 | |
| 7453 @DomName('DOMSelection.focusOffset') | |
| 7454 @DocsEditable | |
| 7455 final int focusOffset; | |
| 7456 | |
| 7457 @DomName('DOMSelection.isCollapsed') | |
| 7458 @DocsEditable | |
| 7459 final bool isCollapsed; | |
| 7460 | |
| 7461 @DomName('DOMSelection.rangeCount') | |
| 7462 @DocsEditable | |
| 7463 final int rangeCount; | |
| 7464 | |
| 7465 @DomName('DOMSelection.type') | |
| 7466 @DocsEditable | |
| 7467 final String type; | |
| 7468 | |
| 7469 @DomName('DOMSelection.addRange') | |
| 7470 @DocsEditable | |
| 7471 void addRange(Range range) native; | |
| 7472 | |
| 7473 @DomName('DOMSelection.collapse') | |
| 7474 @DocsEditable | |
| 7475 void collapse(Node node, int index) native; | |
| 7476 | |
| 7477 @DomName('DOMSelection.collapseToEnd') | |
| 7478 @DocsEditable | |
| 7479 void collapseToEnd() native; | |
| 7480 | |
| 7481 @DomName('DOMSelection.collapseToStart') | |
| 7482 @DocsEditable | |
| 7483 void collapseToStart() native; | |
| 7484 | |
| 7485 @DomName('DOMSelection.containsNode') | |
| 7486 @DocsEditable | |
| 7487 bool containsNode(Node node, bool allowPartial) native; | |
| 7488 | |
| 7489 @DomName('DOMSelection.deleteFromDocument') | |
| 7490 @DocsEditable | |
| 7491 void deleteFromDocument() native; | |
| 7492 | |
| 7493 @DomName('DOMSelection.empty') | |
| 7494 @DocsEditable | |
| 7495 void empty() native; | |
| 7496 | |
| 7497 @DomName('DOMSelection.extend') | |
| 7498 @DocsEditable | |
| 7499 void extend(Node node, int offset) native; | |
| 7500 | |
| 7501 @DomName('DOMSelection.getRangeAt') | |
| 7502 @DocsEditable | |
| 7503 Range getRangeAt(int index) native; | |
| 7504 | |
| 7505 @DomName('DOMSelection.modify') | |
| 7506 @DocsEditable | |
| 7507 void modify(String alter, String direction, String granularity) native; | |
| 7508 | |
| 7509 @DomName('DOMSelection.removeAllRanges') | |
| 7510 @DocsEditable | |
| 7511 void removeAllRanges() native; | |
| 7512 | |
| 7513 @DomName('DOMSelection.selectAllChildren') | |
| 7514 @DocsEditable | |
| 7515 void selectAllChildren(Node node) native; | |
| 7516 | |
| 7517 @DomName('DOMSelection.setBaseAndExtent') | |
| 7518 @DocsEditable | |
| 7519 void setBaseAndExtent(Node baseNode, int baseOffset, Node extentNode, int exte
ntOffset) native; | |
| 7520 | |
| 7521 @DomName('DOMSelection.setPosition') | |
| 7522 @DocsEditable | |
| 7523 void setPosition(Node node, int offset) native; | |
| 7524 | |
| 7525 @DomName('DOMSelection.toString') | |
| 7526 @DocsEditable | |
| 7527 String toString() native; | |
| 7528 } | |
| 7529 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 7530 // for details. All rights reserved. Use of this source code is governed by a | |
| 7531 // BSD-style license that can be found in the LICENSE file. | |
| 7532 | |
| 7533 | |
| 7534 @DocsEditable | |
| 7535 @DomName('DOMSettableTokenList') | |
| 7536 class DomSettableTokenList extends DomTokenList native "DOMSettableTokenList" { | |
| 7537 | |
| 7538 @DomName('DOMSettableTokenList.value') | |
| 7539 @DocsEditable | |
| 7540 String value; | |
| 7541 } | |
| 7542 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 7543 // for details. All rights reserved. Use of this source code is governed by a | |
| 7544 // BSD-style license that can be found in the LICENSE file. | |
| 7545 | |
| 7546 | |
| 7547 @DocsEditable | |
| 7548 @DomName('DOMStringList') | |
| 7549 class DomStringList implements JavaScriptIndexingBehavior, List<String> native "
DOMStringList" { | |
| 7550 | |
| 7551 @DomName('DOMStringList.length') | |
| 7552 @DocsEditable | |
| 7553 int get length => JS("int", "#.length", this); | |
| 7554 | |
| 7555 String operator[](int index) => JS("String", "#[#]", this, index); | |
| 7556 | |
| 7557 void operator[]=(int index, String value) { | |
| 7558 throw new UnsupportedError("Cannot assign element of immutable List."); | |
| 7559 } | |
| 7560 // -- start List<String> mixins. | |
| 7561 // String is the element type. | |
| 7562 | |
| 7563 // From Iterable<String>: | |
| 7564 | |
| 7565 Iterator<String> get iterator { | |
| 7566 // Note: NodeLists are not fixed size. And most probably length shouldn't | |
| 7567 // be cached in both iterator _and_ forEach method. For now caching it | |
| 7568 // for consistency. | |
| 7569 return new FixedSizeListIterator<String>(this); | |
| 7570 } | |
| 7571 | |
| 7572 String reduce(String combine(String value, String element)) { | |
| 7573 return IterableMixinWorkaround.reduce(this, combine); | |
| 7574 } | |
| 7575 | |
| 7576 dynamic fold(dynamic initialValue, | |
| 7577 dynamic combine(dynamic previousValue, String element)) { | |
| 7578 return IterableMixinWorkaround.fold(this, initialValue, combine); | |
| 7579 } | |
| 7580 | |
| 7581 // contains() defined by IDL. | |
| 7582 | |
| 7583 void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this,
f); | |
| 7584 | |
| 7585 String join([String separator = ""]) => | |
| 7586 IterableMixinWorkaround.joinList(this, separator); | |
| 7587 | |
| 7588 Iterable map(f(String element)) => | |
| 7589 IterableMixinWorkaround.mapList(this, f); | |
| 7590 | |
| 7591 Iterable<String> where(bool f(String element)) => | |
| 7592 IterableMixinWorkaround.where(this, f); | |
| 7593 | |
| 7594 Iterable expand(Iterable f(String element)) => | |
| 7595 IterableMixinWorkaround.expand(this, f); | |
| 7596 | |
| 7597 bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f); | |
| 7598 | |
| 7599 bool any(bool f(String element)) => IterableMixinWorkaround.any(this, f); | |
| 7600 | |
| 7601 List<String> toList({ bool growable: true }) => | |
| 7602 new List<String>.from(this, growable: growable); | |
| 7603 | |
| 7604 Set<String> toSet() => new Set<String>.from(this); | |
| 7605 | |
| 7606 bool get isEmpty => this.length == 0; | |
| 7607 | |
| 7608 Iterable<String> take(int n) => IterableMixinWorkaround.takeList(this, n); | |
| 7609 | |
| 7610 Iterable<String> takeWhile(bool test(String value)) { | |
| 7611 return IterableMixinWorkaround.takeWhile(this, test); | |
| 7612 } | |
| 7613 | |
| 7614 Iterable<String> skip(int n) => IterableMixinWorkaround.skipList(this, n); | |
| 7615 | |
| 7616 Iterable<String> skipWhile(bool test(String value)) { | |
| 7617 return IterableMixinWorkaround.skipWhile(this, test); | |
| 7618 } | |
| 7619 | |
| 7620 String firstWhere(bool test(String value), { String orElse() }) { | |
| 7621 return IterableMixinWorkaround.firstWhere(this, test, orElse); | |
| 7622 } | |
| 7623 | |
| 7624 String lastWhere(bool test(String value), {String orElse()}) { | |
| 7625 return IterableMixinWorkaround.lastWhereList(this, test, orElse); | |
| 7626 } | |
| 7627 | |
| 7628 String singleWhere(bool test(String value)) { | |
| 7629 return IterableMixinWorkaround.singleWhere(this, test); | |
| 7630 } | |
| 7631 | |
| 7632 String elementAt(int index) { | |
| 7633 return this[index]; | |
| 7634 } | |
| 7635 | |
| 7636 // From Collection<String>: | |
| 7637 | |
| 7638 void add(String value) { | |
| 7639 throw new UnsupportedError("Cannot add to immutable List."); | |
| 7640 } | |
| 7641 | |
| 7642 void addAll(Iterable<String> iterable) { | |
| 7643 throw new UnsupportedError("Cannot add to immutable List."); | |
| 7644 } | |
| 7645 | |
| 7646 // From List<String>: | |
| 7647 void set length(int value) { | |
| 7648 throw new UnsupportedError("Cannot resize immutable List."); | |
| 7649 } | |
| 7650 | |
| 7651 void clear() { | |
| 7652 throw new UnsupportedError("Cannot clear immutable List."); | |
| 7653 } | |
| 7654 | |
| 7655 Iterable<String> get reversed { | |
| 7656 return IterableMixinWorkaround.reversedList(this); | |
| 7657 } | |
| 7658 | |
| 7659 void sort([int compare(String a, String b)]) { | |
| 7660 throw new UnsupportedError("Cannot sort immutable List."); | |
| 7661 } | |
| 7662 | |
| 7663 int indexOf(String element, [int start = 0]) => | |
| 7664 Lists.indexOf(this, element, start, this.length); | |
| 7665 | |
| 7666 int lastIndexOf(String element, [int start]) { | |
| 7667 if (start == null) start = length - 1; | |
| 7668 return Lists.lastIndexOf(this, element, start); | |
| 7669 } | |
| 7670 | |
| 7671 String get first { | |
| 7672 if (this.length > 0) return this[0]; | |
| 7673 throw new StateError("No elements"); | |
| 7674 } | |
| 7675 | |
| 7676 String get last { | |
| 7677 if (this.length > 0) return this[this.length - 1]; | |
| 7678 throw new StateError("No elements"); | |
| 7679 } | |
| 7680 | |
| 7681 String get single { | |
| 7682 if (length == 1) return this[0]; | |
| 7683 if (length == 0) throw new StateError("No elements"); | |
| 7684 throw new StateError("More than one element"); | |
| 7685 } | |
| 7686 | |
| 7687 void insert(int index, String element) { | |
| 7688 throw new UnsupportedError("Cannot add to immutable List."); | |
| 7689 } | |
| 7690 | |
| 7691 void insertAll(int index, Iterable<String> iterable) { | |
| 7692 throw new UnsupportedError("Cannot add to immutable List."); | |
| 7693 } | |
| 7694 | |
| 7695 void setAll(int index, Iterable<String> iterable) { | |
| 7696 throw new UnsupportedError("Cannot modify an immutable List."); | |
| 7697 } | |
| 7698 | |
| 7699 String removeAt(int pos) { | |
| 7700 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7701 } | |
| 7702 | |
| 7703 String removeLast() { | |
| 7704 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7705 } | |
| 7706 | |
| 7707 bool remove(Object object) { | |
| 7708 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7709 } | |
| 7710 | |
| 7711 void removeWhere(bool test(String element)) { | |
| 7712 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7713 } | |
| 7714 | |
| 7715 void retainWhere(bool test(String element)) { | |
| 7716 throw new UnsupportedError("Cannot remove from immutable List."); | |
| 7717 } | |
| 7718 | |
| 7719 void setRange(int start, int end, Iterable<String> iterable, [int skipCount=0]
) { | |
| 7720 throw new UnsupportedError("Cannot setRange on immutable List."); | |
| 7721 } | |
| 7722 | |
| 7723 void removeRange(int start, int end) { | |
| 7724 throw new UnsupportedError("Cannot removeRange on immutable List."); | |
| 7725 } | |
| 7726 | |
| 7727 void replaceRange(int start, int end, Iterable<String> iterable) { | |
| 7728 throw new UnsupportedError("Cannot modify an immutable List."); | |
| 7729 } | |
| 7730 | |
| 7731 void fillRange(int start, int end, [String fillValue]) { | |
| 7732 throw new UnsupportedError("Cannot modify an immutable List."); | |
| 7733 } | |
| 7734 | |
| 7735 Iterable<String> getRange(int start, int end) => | |
| 7736 IterableMixinWorkaround.getRangeList(this, start, end); | |
| 7737 | |
| 7738 List<String> sublist(int start, [int end]) { | |
| 7739 if (end == null) end = length; | |
| 7740 return Lists.getRange(this, start, end, <String>[]); | |
| 7741 } | |
| 7742 | |
| 7743 Map<int, String> asMap() => | |
| 7744 IterableMixinWorkaround.asMapList(this); | |
| 7745 | |
| 7746 String toString() { | |
| 7747 StringBuffer buffer = new StringBuffer('['); | |
| 7748 buffer.writeAll(this, ', '); | |
| 7749 buffer.write(']'); | |
| 7750 return buffer.toString(); | |
| 7751 } | |
| 7752 | |
| 7753 // -- end List<String> mixins. | |
| 7754 | |
| 7755 @DomName('DOMStringList.contains') | |
| 7756 @DocsEditable | |
| 7757 bool contains(String string) native; | |
| 7758 | |
| 7759 @DomName('DOMStringList.item') | |
| 7760 @DocsEditable | |
| 7761 String item(int index) native; | |
| 7762 } | |
| 7763 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 7764 // for details. All rights reserved. Use of this source code is governed by a | |
| 7765 // BSD-style license that can be found in the LICENSE file. | |
| 7766 | |
| 7767 | |
| 7768 @DomName('DOMStringMap') | |
| 7769 abstract class DomStringMap { | |
| 7770 } | |
| 7771 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 7772 // for details. All rights reserved. Use of this source code is governed by a | |
| 7773 // BSD-style license that can be found in the LICENSE file. | |
| 7774 | |
| 7775 | |
| 7776 @DocsEditable | |
| 7777 @DomName('DOMTokenList') | 7052 @DomName('DOMTokenList') |
| 7778 class DomTokenList native "DOMTokenList" { | 7053 class DomTokenList native "DOMTokenList" { |
| 7779 | 7054 |
| 7780 @DomName('DOMTokenList.length') | 7055 @DomName('DOMTokenList.length') |
| 7781 @DocsEditable | 7056 @DocsEditable |
| 7782 final int length; | 7057 final int length; |
| 7783 | 7058 |
| 7784 @DomName('DOMTokenList.contains') | 7059 @DomName('DOMTokenList.contains') |
| 7785 @DocsEditable | 7060 @DocsEditable |
| 7786 bool contains(String token) native; | 7061 bool contains(String token) native; |
| (...skipping 7145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14932 @DomName('HTMLMeterElement.value') | 14207 @DomName('HTMLMeterElement.value') |
| 14933 @DocsEditable | 14208 @DocsEditable |
| 14934 num value; | 14209 num value; |
| 14935 } | 14210 } |
| 14936 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 14211 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 14937 // for details. All rights reserved. Use of this source code is governed by a | 14212 // for details. All rights reserved. Use of this source code is governed by a |
| 14938 // BSD-style license that can be found in the LICENSE file. | 14213 // BSD-style license that can be found in the LICENSE file. |
| 14939 | 14214 |
| 14940 | 14215 |
| 14941 @DocsEditable | 14216 @DocsEditable |
| 14217 @DomName('MimeType') |
| 14218 class MimeType native "MimeType" { |
| 14219 |
| 14220 @DomName('DOMMimeType.description') |
| 14221 @DocsEditable |
| 14222 final String description; |
| 14223 |
| 14224 @DomName('DOMMimeType.enabledPlugin') |
| 14225 @DocsEditable |
| 14226 final Plugin enabledPlugin; |
| 14227 |
| 14228 @DomName('DOMMimeType.suffixes') |
| 14229 @DocsEditable |
| 14230 final String suffixes; |
| 14231 |
| 14232 @DomName('DOMMimeType.type') |
| 14233 @DocsEditable |
| 14234 final String type; |
| 14235 } |
| 14236 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 14237 // for details. All rights reserved. Use of this source code is governed by a |
| 14238 // BSD-style license that can be found in the LICENSE file. |
| 14239 |
| 14240 |
| 14241 @DocsEditable |
| 14242 @DomName('MimeTypeArray') |
| 14243 class MimeTypeArray implements JavaScriptIndexingBehavior, List<MimeType> native
"MimeTypeArray" { |
| 14244 |
| 14245 @DomName('DOMMimeTypeArray.length') |
| 14246 @DocsEditable |
| 14247 int get length => JS("int", "#.length", this); |
| 14248 |
| 14249 MimeType operator[](int index) => JS("MimeType", "#[#]", this, index); |
| 14250 |
| 14251 void operator[]=(int index, MimeType value) { |
| 14252 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 14253 } |
| 14254 // -- start List<MimeType> mixins. |
| 14255 // MimeType is the element type. |
| 14256 |
| 14257 // From Iterable<MimeType>: |
| 14258 |
| 14259 Iterator<MimeType> get iterator { |
| 14260 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 14261 // be cached in both iterator _and_ forEach method. For now caching it |
| 14262 // for consistency. |
| 14263 return new FixedSizeListIterator<MimeType>(this); |
| 14264 } |
| 14265 |
| 14266 MimeType reduce(MimeType combine(MimeType value, MimeType element)) { |
| 14267 return IterableMixinWorkaround.reduce(this, combine); |
| 14268 } |
| 14269 |
| 14270 dynamic fold(dynamic initialValue, |
| 14271 dynamic combine(dynamic previousValue, MimeType element)) { |
| 14272 return IterableMixinWorkaround.fold(this, initialValue, combine); |
| 14273 } |
| 14274 |
| 14275 bool contains(MimeType element) => IterableMixinWorkaround.contains(this, elem
ent); |
| 14276 |
| 14277 void forEach(void f(MimeType element)) => IterableMixinWorkaround.forEach(this
, f); |
| 14278 |
| 14279 String join([String separator = ""]) => |
| 14280 IterableMixinWorkaround.joinList(this, separator); |
| 14281 |
| 14282 Iterable map(f(MimeType element)) => |
| 14283 IterableMixinWorkaround.mapList(this, f); |
| 14284 |
| 14285 Iterable<MimeType> where(bool f(MimeType element)) => |
| 14286 IterableMixinWorkaround.where(this, f); |
| 14287 |
| 14288 Iterable expand(Iterable f(MimeType element)) => |
| 14289 IterableMixinWorkaround.expand(this, f); |
| 14290 |
| 14291 bool every(bool f(MimeType element)) => IterableMixinWorkaround.every(this, f)
; |
| 14292 |
| 14293 bool any(bool f(MimeType element)) => IterableMixinWorkaround.any(this, f); |
| 14294 |
| 14295 List<MimeType> toList({ bool growable: true }) => |
| 14296 new List<MimeType>.from(this, growable: growable); |
| 14297 |
| 14298 Set<MimeType> toSet() => new Set<MimeType>.from(this); |
| 14299 |
| 14300 bool get isEmpty => this.length == 0; |
| 14301 |
| 14302 Iterable<MimeType> take(int n) => IterableMixinWorkaround.takeList(this, n); |
| 14303 |
| 14304 Iterable<MimeType> takeWhile(bool test(MimeType value)) { |
| 14305 return IterableMixinWorkaround.takeWhile(this, test); |
| 14306 } |
| 14307 |
| 14308 Iterable<MimeType> skip(int n) => IterableMixinWorkaround.skipList(this, n); |
| 14309 |
| 14310 Iterable<MimeType> skipWhile(bool test(MimeType value)) { |
| 14311 return IterableMixinWorkaround.skipWhile(this, test); |
| 14312 } |
| 14313 |
| 14314 MimeType firstWhere(bool test(MimeType value), { MimeType orElse() }) { |
| 14315 return IterableMixinWorkaround.firstWhere(this, test, orElse); |
| 14316 } |
| 14317 |
| 14318 MimeType lastWhere(bool test(MimeType value), {MimeType orElse()}) { |
| 14319 return IterableMixinWorkaround.lastWhereList(this, test, orElse); |
| 14320 } |
| 14321 |
| 14322 MimeType singleWhere(bool test(MimeType value)) { |
| 14323 return IterableMixinWorkaround.singleWhere(this, test); |
| 14324 } |
| 14325 |
| 14326 MimeType elementAt(int index) { |
| 14327 return this[index]; |
| 14328 } |
| 14329 |
| 14330 // From Collection<MimeType>: |
| 14331 |
| 14332 void add(MimeType value) { |
| 14333 throw new UnsupportedError("Cannot add to immutable List."); |
| 14334 } |
| 14335 |
| 14336 void addAll(Iterable<MimeType> iterable) { |
| 14337 throw new UnsupportedError("Cannot add to immutable List."); |
| 14338 } |
| 14339 |
| 14340 // From List<MimeType>: |
| 14341 void set length(int value) { |
| 14342 throw new UnsupportedError("Cannot resize immutable List."); |
| 14343 } |
| 14344 |
| 14345 void clear() { |
| 14346 throw new UnsupportedError("Cannot clear immutable List."); |
| 14347 } |
| 14348 |
| 14349 Iterable<MimeType> get reversed { |
| 14350 return IterableMixinWorkaround.reversedList(this); |
| 14351 } |
| 14352 |
| 14353 void sort([int compare(MimeType a, MimeType b)]) { |
| 14354 throw new UnsupportedError("Cannot sort immutable List."); |
| 14355 } |
| 14356 |
| 14357 int indexOf(MimeType element, [int start = 0]) => |
| 14358 Lists.indexOf(this, element, start, this.length); |
| 14359 |
| 14360 int lastIndexOf(MimeType element, [int start]) { |
| 14361 if (start == null) start = length - 1; |
| 14362 return Lists.lastIndexOf(this, element, start); |
| 14363 } |
| 14364 |
| 14365 MimeType get first { |
| 14366 if (this.length > 0) return this[0]; |
| 14367 throw new StateError("No elements"); |
| 14368 } |
| 14369 |
| 14370 MimeType get last { |
| 14371 if (this.length > 0) return this[this.length - 1]; |
| 14372 throw new StateError("No elements"); |
| 14373 } |
| 14374 |
| 14375 MimeType get single { |
| 14376 if (length == 1) return this[0]; |
| 14377 if (length == 0) throw new StateError("No elements"); |
| 14378 throw new StateError("More than one element"); |
| 14379 } |
| 14380 |
| 14381 void insert(int index, MimeType element) { |
| 14382 throw new UnsupportedError("Cannot add to immutable List."); |
| 14383 } |
| 14384 |
| 14385 void insertAll(int index, Iterable<MimeType> iterable) { |
| 14386 throw new UnsupportedError("Cannot add to immutable List."); |
| 14387 } |
| 14388 |
| 14389 void setAll(int index, Iterable<MimeType> iterable) { |
| 14390 throw new UnsupportedError("Cannot modify an immutable List."); |
| 14391 } |
| 14392 |
| 14393 MimeType removeAt(int pos) { |
| 14394 throw new UnsupportedError("Cannot remove from immutable List."); |
| 14395 } |
| 14396 |
| 14397 MimeType removeLast() { |
| 14398 throw new UnsupportedError("Cannot remove from immutable List."); |
| 14399 } |
| 14400 |
| 14401 bool remove(Object object) { |
| 14402 throw new UnsupportedError("Cannot remove from immutable List."); |
| 14403 } |
| 14404 |
| 14405 void removeWhere(bool test(MimeType element)) { |
| 14406 throw new UnsupportedError("Cannot remove from immutable List."); |
| 14407 } |
| 14408 |
| 14409 void retainWhere(bool test(MimeType element)) { |
| 14410 throw new UnsupportedError("Cannot remove from immutable List."); |
| 14411 } |
| 14412 |
| 14413 void setRange(int start, int end, Iterable<MimeType> iterable, [int skipCount=
0]) { |
| 14414 throw new UnsupportedError("Cannot setRange on immutable List."); |
| 14415 } |
| 14416 |
| 14417 void removeRange(int start, int end) { |
| 14418 throw new UnsupportedError("Cannot removeRange on immutable List."); |
| 14419 } |
| 14420 |
| 14421 void replaceRange(int start, int end, Iterable<MimeType> iterable) { |
| 14422 throw new UnsupportedError("Cannot modify an immutable List."); |
| 14423 } |
| 14424 |
| 14425 void fillRange(int start, int end, [MimeType fillValue]) { |
| 14426 throw new UnsupportedError("Cannot modify an immutable List."); |
| 14427 } |
| 14428 |
| 14429 Iterable<MimeType> getRange(int start, int end) => |
| 14430 IterableMixinWorkaround.getRangeList(this, start, end); |
| 14431 |
| 14432 List<MimeType> sublist(int start, [int end]) { |
| 14433 if (end == null) end = length; |
| 14434 return Lists.getRange(this, start, end, <MimeType>[]); |
| 14435 } |
| 14436 |
| 14437 Map<int, MimeType> asMap() => |
| 14438 IterableMixinWorkaround.asMapList(this); |
| 14439 |
| 14440 String toString() { |
| 14441 StringBuffer buffer = new StringBuffer('['); |
| 14442 buffer.writeAll(this, ', '); |
| 14443 buffer.write(']'); |
| 14444 return buffer.toString(); |
| 14445 } |
| 14446 |
| 14447 // -- end List<MimeType> mixins. |
| 14448 |
| 14449 @DomName('DOMMimeTypeArray.item') |
| 14450 @DocsEditable |
| 14451 MimeType item(int index) native; |
| 14452 |
| 14453 @DomName('DOMMimeTypeArray.namedItem') |
| 14454 @DocsEditable |
| 14455 MimeType namedItem(String name) native; |
| 14456 } |
| 14457 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 14458 // for details. All rights reserved. Use of this source code is governed by a |
| 14459 // BSD-style license that can be found in the LICENSE file. |
| 14460 |
| 14461 |
| 14462 @DocsEditable |
| 14942 @DomName('HTMLModElement') | 14463 @DomName('HTMLModElement') |
| 14943 class ModElement extends Element native "HTMLModElement" { | 14464 class ModElement extends Element native "HTMLModElement" { |
| 14944 | 14465 |
| 14945 @DomName('HTMLModElement.cite') | 14466 @DomName('HTMLModElement.cite') |
| 14946 @DocsEditable | 14467 @DocsEditable |
| 14947 String cite; | 14468 String cite; |
| 14948 | 14469 |
| 14949 @DomName('HTMLModElement.dateTime') | 14470 @DomName('HTMLModElement.dateTime') |
| 14950 @DocsEditable | 14471 @DocsEditable |
| 14951 String dateTime; | 14472 String dateTime; |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15326 @DocsEditable | 14847 @DocsEditable |
| 15327 final String type; | 14848 final String type; |
| 15328 } | 14849 } |
| 15329 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 14850 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 15330 // for details. All rights reserved. Use of this source code is governed by a | 14851 // for details. All rights reserved. Use of this source code is governed by a |
| 15331 // BSD-style license that can be found in the LICENSE file. | 14852 // BSD-style license that can be found in the LICENSE file. |
| 15332 | 14853 |
| 15333 | 14854 |
| 15334 @DocsEditable | 14855 @DocsEditable |
| 15335 @DomName('WebKitNamedFlow') | 14856 @DomName('WebKitNamedFlow') |
| 14857 @SupportedBrowser(SupportedBrowser.CHROME) |
| 14858 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 14859 @Experimental |
| 15336 class NamedFlow extends EventTarget native "WebKitNamedFlow" { | 14860 class NamedFlow extends EventTarget native "WebKitNamedFlow" { |
| 15337 | 14861 |
| 15338 @DomName('NamedFlow.firstEmptyRegionIndex') | 14862 @DomName('NamedFlow.firstEmptyRegionIndex') |
| 15339 @DocsEditable | 14863 @DocsEditable |
| 15340 final int firstEmptyRegionIndex; | 14864 final int firstEmptyRegionIndex; |
| 15341 | 14865 |
| 15342 @DomName('NamedFlow.name') | 14866 @DomName('NamedFlow.name') |
| 15343 @DocsEditable | 14867 @DocsEditable |
| 15344 final String name; | 14868 final String name; |
| 15345 | 14869 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15377 @JSName('removeEventListener') | 14901 @JSName('removeEventListener') |
| 15378 @DomName('NamedFlow.removeEventListener') | 14902 @DomName('NamedFlow.removeEventListener') |
| 15379 @DocsEditable | 14903 @DocsEditable |
| 15380 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 14904 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
| 15381 } | 14905 } |
| 15382 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 14906 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 15383 // for details. All rights reserved. Use of this source code is governed by a | 14907 // for details. All rights reserved. Use of this source code is governed by a |
| 15384 // BSD-style license that can be found in the LICENSE file. | 14908 // BSD-style license that can be found in the LICENSE file. |
| 15385 | 14909 |
| 15386 | 14910 |
| 14911 @DocsEditable |
| 14912 @DomName('WebKitNamedFlowCollection') |
| 14913 @SupportedBrowser(SupportedBrowser.CHROME) |
| 14914 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 14915 @Experimental |
| 14916 class NamedFlowCollection native "WebKitNamedFlowCollection" { |
| 14917 |
| 14918 @DomName('DOMNamedFlowCollection.length') |
| 14919 @DocsEditable |
| 14920 final int length; |
| 14921 |
| 14922 @DomName('DOMNamedFlowCollection.item') |
| 14923 @DocsEditable |
| 14924 NamedFlow item(int index) native; |
| 14925 |
| 14926 @DomName('DOMNamedFlowCollection.namedItem') |
| 14927 @DocsEditable |
| 14928 NamedFlow namedItem(String name) native; |
| 14929 } |
| 14930 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 14931 // for details. All rights reserved. Use of this source code is governed by a |
| 14932 // BSD-style license that can be found in the LICENSE file. |
| 14933 |
| 14934 |
| 15387 @DomName('Navigator') | 14935 @DomName('Navigator') |
| 15388 class Navigator native "Navigator" { | 14936 class Navigator native "Navigator" { |
| 15389 | 14937 |
| 15390 @DomName('Navigator.language') | 14938 @DomName('Navigator.language') |
| 15391 String get language => JS('String', '#.language || #.userLanguage', this, | 14939 String get language => JS('String', '#.language || #.userLanguage', this, |
| 15392 this); | 14940 this); |
| 15393 | 14941 |
| 15394 /** | 14942 /** |
| 15395 * Gets a stream (video and or audio) from the local computer. | 14943 * Gets a stream (video and or audio) from the local computer. |
| 15396 * | 14944 * |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15478 @DomName('Navigator.doNotTrack') | 15026 @DomName('Navigator.doNotTrack') |
| 15479 @DocsEditable | 15027 @DocsEditable |
| 15480 final String doNotTrack; | 15028 final String doNotTrack; |
| 15481 | 15029 |
| 15482 @DomName('Navigator.geolocation') | 15030 @DomName('Navigator.geolocation') |
| 15483 @DocsEditable | 15031 @DocsEditable |
| 15484 final Geolocation geolocation; | 15032 final Geolocation geolocation; |
| 15485 | 15033 |
| 15486 @DomName('Navigator.mimeTypes') | 15034 @DomName('Navigator.mimeTypes') |
| 15487 @DocsEditable | 15035 @DocsEditable |
| 15488 final DomMimeTypeArray mimeTypes; | 15036 final MimeTypeArray mimeTypes; |
| 15489 | 15037 |
| 15490 @DomName('Navigator.onLine') | 15038 @DomName('Navigator.onLine') |
| 15491 @DocsEditable | 15039 @DocsEditable |
| 15492 final bool onLine; | 15040 final bool onLine; |
| 15493 | 15041 |
| 15494 @DomName('Navigator.platform') | 15042 @DomName('Navigator.platform') |
| 15495 @DocsEditable | 15043 @DocsEditable |
| 15496 final String platform; | 15044 final String platform; |
| 15497 | 15045 |
| 15498 @DomName('Navigator.plugins') | 15046 @DomName('Navigator.plugins') |
| 15499 @DocsEditable | 15047 @DocsEditable |
| 15500 final DomPluginArray plugins; | 15048 final PluginArray plugins; |
| 15501 | 15049 |
| 15502 @DomName('Navigator.product') | 15050 @DomName('Navigator.product') |
| 15503 @DocsEditable | 15051 @DocsEditable |
| 15504 final String product; | 15052 final String product; |
| 15505 | 15053 |
| 15506 @DomName('Navigator.productSub') | 15054 @DomName('Navigator.productSub') |
| 15507 @DocsEditable | 15055 @DocsEditable |
| 15508 final String productSub; | 15056 final String productSub; |
| 15509 | 15057 |
| 15510 @DomName('Navigator.userAgent') | 15058 @DomName('Navigator.userAgent') |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16832 @DocsEditable | 16380 @DocsEditable |
| 16833 @DomName('HTMLParagraphElement') | 16381 @DomName('HTMLParagraphElement') |
| 16834 class ParagraphElement extends Element native "HTMLParagraphElement" { | 16382 class ParagraphElement extends Element native "HTMLParagraphElement" { |
| 16835 | 16383 |
| 16836 @DomName('HTMLParagraphElement.HTMLParagraphElement') | 16384 @DomName('HTMLParagraphElement.HTMLParagraphElement') |
| 16837 @DocsEditable | 16385 @DocsEditable |
| 16838 factory ParagraphElement() => document.$dom_createElement("p"); | 16386 factory ParagraphElement() => document.$dom_createElement("p"); |
| 16839 } | 16387 } |
| 16840 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 16388 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 16841 // for details. All rights reserved. Use of this source code is governed by a | 16389 // for details. All rights reserved. Use of this source code is governed by a |
| 16390 // BSD-style license that can be found in the LICENSE file. |
| 16391 |
| 16392 |
| 16393 @DocsEditable |
| 16394 @DomName('HTMLParamElement') |
| 16395 class ParamElement extends Element native "HTMLParamElement" { |
| 16396 |
| 16397 @DomName('HTMLParamElement.HTMLParamElement') |
| 16398 @DocsEditable |
| 16399 factory ParamElement() => document.$dom_createElement("param"); |
| 16400 |
| 16401 @DomName('HTMLParamElement.name') |
| 16402 @DocsEditable |
| 16403 String name; |
| 16404 |
| 16405 @DomName('HTMLParamElement.value') |
| 16406 @DocsEditable |
| 16407 String value; |
| 16408 } |
| 16409 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 16410 // for details. All rights reserved. Use of this source code is governed by a |
| 16842 // BSD-style license that can be found in the LICENSE file. | 16411 // BSD-style license that can be found in the LICENSE file. |
| 16843 | 16412 |
| 16844 | 16413 |
| 16845 @DocsEditable | 16414 @DocsEditable |
| 16846 @DomName('HTMLParamElement') | 16415 @DomName('Path') |
| 16847 class ParamElement extends Element native "HTMLParamElement" { | 16416 class Path native "Path" { |
| 16848 | 16417 |
| 16849 @DomName('HTMLParamElement.HTMLParamElement') | 16418 @DomName('DOMPath.DOMPath') |
| 16850 @DocsEditable | 16419 @DocsEditable |
| 16851 factory ParamElement() => document.$dom_createElement("param"); | 16420 factory Path([path_OR_text]) { |
| 16421 if (!?path_OR_text) { |
| 16422 return Path._create_1(); |
| 16423 } |
| 16424 if ((path_OR_text is Path || path_OR_text == null)) { |
| 16425 return Path._create_2(path_OR_text); |
| 16426 } |
| 16427 if ((path_OR_text is String || path_OR_text == null)) { |
| 16428 return Path._create_3(path_OR_text); |
| 16429 } |
| 16430 throw new ArgumentError("Incorrect number or type of arguments"); |
| 16431 } |
| 16432 static Path _create_1() => JS('Path', 'new Path()'); |
| 16433 static Path _create_2(path_OR_text) => JS('Path', 'new Path(#)', path_OR_text)
; |
| 16434 static Path _create_3(path_OR_text) => JS('Path', 'new Path(#)', path_OR_text)
; |
| 16852 | 16435 |
| 16853 @DomName('HTMLParamElement.name') | 16436 @DomName('DOMPath.arc') |
| 16854 @DocsEditable | 16437 @DocsEditable |
| 16855 String name; | 16438 void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticloc
kwise) native; |
| 16856 | 16439 |
| 16857 @DomName('HTMLParamElement.value') | 16440 @DomName('DOMPath.arcTo') |
| 16858 @DocsEditable | 16441 @DocsEditable |
| 16859 String value; | 16442 void arcTo(num x1, num y1, num x2, num y2, num radius) native; |
| 16443 |
| 16444 @DomName('DOMPath.bezierCurveTo') |
| 16445 @DocsEditable |
| 16446 void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) nativ
e; |
| 16447 |
| 16448 @DomName('DOMPath.closePath') |
| 16449 @DocsEditable |
| 16450 void closePath() native; |
| 16451 |
| 16452 @DomName('DOMPath.lineTo') |
| 16453 @DocsEditable |
| 16454 void lineTo(num x, num y) native; |
| 16455 |
| 16456 @DomName('DOMPath.moveTo') |
| 16457 @DocsEditable |
| 16458 void moveTo(num x, num y) native; |
| 16459 |
| 16460 @DomName('DOMPath.quadraticCurveTo') |
| 16461 @DocsEditable |
| 16462 void quadraticCurveTo(num cpx, num cpy, num x, num y) native; |
| 16463 |
| 16464 @DomName('DOMPath.rect') |
| 16465 @DocsEditable |
| 16466 void rect(num x, num y, num width, num height) native; |
| 16860 } | 16467 } |
| 16861 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 16468 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 16862 // for details. All rights reserved. Use of this source code is governed by a | 16469 // for details. All rights reserved. Use of this source code is governed by a |
| 16863 // BSD-style license that can be found in the LICENSE file. | 16470 // BSD-style license that can be found in the LICENSE file. |
| 16864 | 16471 |
| 16865 | 16472 |
| 16866 @DocsEditable | 16473 @DocsEditable |
| 16867 @DomName('Performance') | 16474 @DomName('Performance') |
| 16868 @SupportedBrowser(SupportedBrowser.CHROME) | 16475 @SupportedBrowser(SupportedBrowser.CHROME) |
| 16869 @SupportedBrowser(SupportedBrowser.FIREFOX) | 16476 @SupportedBrowser(SupportedBrowser.FIREFOX) |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17191 @DomName('PerformanceTiming.unloadEventEnd') | 16798 @DomName('PerformanceTiming.unloadEventEnd') |
| 17192 @DocsEditable | 16799 @DocsEditable |
| 17193 final int unloadEventEnd; | 16800 final int unloadEventEnd; |
| 17194 | 16801 |
| 17195 @DomName('PerformanceTiming.unloadEventStart') | 16802 @DomName('PerformanceTiming.unloadEventStart') |
| 17196 @DocsEditable | 16803 @DocsEditable |
| 17197 final int unloadEventStart; | 16804 final int unloadEventStart; |
| 17198 } | 16805 } |
| 17199 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 16806 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 17200 // for details. All rights reserved. Use of this source code is governed by a | 16807 // for details. All rights reserved. Use of this source code is governed by a |
| 16808 // BSD-style license that can be found in the LICENSE file. |
| 16809 |
| 16810 |
| 16811 @DocsEditable |
| 16812 @DomName('Plugin') |
| 16813 class Plugin native "Plugin" { |
| 16814 |
| 16815 @DomName('DOMPlugin.description') |
| 16816 @DocsEditable |
| 16817 final String description; |
| 16818 |
| 16819 @DomName('DOMPlugin.filename') |
| 16820 @DocsEditable |
| 16821 final String filename; |
| 16822 |
| 16823 @DomName('DOMPlugin.length') |
| 16824 @DocsEditable |
| 16825 final int length; |
| 16826 |
| 16827 @DomName('DOMPlugin.name') |
| 16828 @DocsEditable |
| 16829 final String name; |
| 16830 |
| 16831 @DomName('DOMPlugin.item') |
| 16832 @DocsEditable |
| 16833 MimeType item(int index) native; |
| 16834 |
| 16835 @DomName('DOMPlugin.namedItem') |
| 16836 @DocsEditable |
| 16837 MimeType namedItem(String name) native; |
| 16838 } |
| 16839 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 16840 // for details. All rights reserved. Use of this source code is governed by a |
| 16841 // BSD-style license that can be found in the LICENSE file. |
| 16842 |
| 16843 |
| 16844 @DocsEditable |
| 16845 @DomName('PluginArray') |
| 16846 class PluginArray implements JavaScriptIndexingBehavior, List<Plugin> native "Pl
uginArray" { |
| 16847 |
| 16848 @DomName('DOMPluginArray.length') |
| 16849 @DocsEditable |
| 16850 int get length => JS("int", "#.length", this); |
| 16851 |
| 16852 Plugin operator[](int index) => JS("Plugin", "#[#]", this, index); |
| 16853 |
| 16854 void operator[]=(int index, Plugin value) { |
| 16855 throw new UnsupportedError("Cannot assign element of immutable List."); |
| 16856 } |
| 16857 // -- start List<Plugin> mixins. |
| 16858 // Plugin is the element type. |
| 16859 |
| 16860 // From Iterable<Plugin>: |
| 16861 |
| 16862 Iterator<Plugin> get iterator { |
| 16863 // Note: NodeLists are not fixed size. And most probably length shouldn't |
| 16864 // be cached in both iterator _and_ forEach method. For now caching it |
| 16865 // for consistency. |
| 16866 return new FixedSizeListIterator<Plugin>(this); |
| 16867 } |
| 16868 |
| 16869 Plugin reduce(Plugin combine(Plugin value, Plugin element)) { |
| 16870 return IterableMixinWorkaround.reduce(this, combine); |
| 16871 } |
| 16872 |
| 16873 dynamic fold(dynamic initialValue, |
| 16874 dynamic combine(dynamic previousValue, Plugin element)) { |
| 16875 return IterableMixinWorkaround.fold(this, initialValue, combine); |
| 16876 } |
| 16877 |
| 16878 bool contains(Plugin element) => IterableMixinWorkaround.contains(this, elemen
t); |
| 16879 |
| 16880 void forEach(void f(Plugin element)) => IterableMixinWorkaround.forEach(this,
f); |
| 16881 |
| 16882 String join([String separator = ""]) => |
| 16883 IterableMixinWorkaround.joinList(this, separator); |
| 16884 |
| 16885 Iterable map(f(Plugin element)) => |
| 16886 IterableMixinWorkaround.mapList(this, f); |
| 16887 |
| 16888 Iterable<Plugin> where(bool f(Plugin element)) => |
| 16889 IterableMixinWorkaround.where(this, f); |
| 16890 |
| 16891 Iterable expand(Iterable f(Plugin element)) => |
| 16892 IterableMixinWorkaround.expand(this, f); |
| 16893 |
| 16894 bool every(bool f(Plugin element)) => IterableMixinWorkaround.every(this, f); |
| 16895 |
| 16896 bool any(bool f(Plugin element)) => IterableMixinWorkaround.any(this, f); |
| 16897 |
| 16898 List<Plugin> toList({ bool growable: true }) => |
| 16899 new List<Plugin>.from(this, growable: growable); |
| 16900 |
| 16901 Set<Plugin> toSet() => new Set<Plugin>.from(this); |
| 16902 |
| 16903 bool get isEmpty => this.length == 0; |
| 16904 |
| 16905 Iterable<Plugin> take(int n) => IterableMixinWorkaround.takeList(this, n); |
| 16906 |
| 16907 Iterable<Plugin> takeWhile(bool test(Plugin value)) { |
| 16908 return IterableMixinWorkaround.takeWhile(this, test); |
| 16909 } |
| 16910 |
| 16911 Iterable<Plugin> skip(int n) => IterableMixinWorkaround.skipList(this, n); |
| 16912 |
| 16913 Iterable<Plugin> skipWhile(bool test(Plugin value)) { |
| 16914 return IterableMixinWorkaround.skipWhile(this, test); |
| 16915 } |
| 16916 |
| 16917 Plugin firstWhere(bool test(Plugin value), { Plugin orElse() }) { |
| 16918 return IterableMixinWorkaround.firstWhere(this, test, orElse); |
| 16919 } |
| 16920 |
| 16921 Plugin lastWhere(bool test(Plugin value), {Plugin orElse()}) { |
| 16922 return IterableMixinWorkaround.lastWhereList(this, test, orElse); |
| 16923 } |
| 16924 |
| 16925 Plugin singleWhere(bool test(Plugin value)) { |
| 16926 return IterableMixinWorkaround.singleWhere(this, test); |
| 16927 } |
| 16928 |
| 16929 Plugin elementAt(int index) { |
| 16930 return this[index]; |
| 16931 } |
| 16932 |
| 16933 // From Collection<Plugin>: |
| 16934 |
| 16935 void add(Plugin value) { |
| 16936 throw new UnsupportedError("Cannot add to immutable List."); |
| 16937 } |
| 16938 |
| 16939 void addAll(Iterable<Plugin> iterable) { |
| 16940 throw new UnsupportedError("Cannot add to immutable List."); |
| 16941 } |
| 16942 |
| 16943 // From List<Plugin>: |
| 16944 void set length(int value) { |
| 16945 throw new UnsupportedError("Cannot resize immutable List."); |
| 16946 } |
| 16947 |
| 16948 void clear() { |
| 16949 throw new UnsupportedError("Cannot clear immutable List."); |
| 16950 } |
| 16951 |
| 16952 Iterable<Plugin> get reversed { |
| 16953 return IterableMixinWorkaround.reversedList(this); |
| 16954 } |
| 16955 |
| 16956 void sort([int compare(Plugin a, Plugin b)]) { |
| 16957 throw new UnsupportedError("Cannot sort immutable List."); |
| 16958 } |
| 16959 |
| 16960 int indexOf(Plugin element, [int start = 0]) => |
| 16961 Lists.indexOf(this, element, start, this.length); |
| 16962 |
| 16963 int lastIndexOf(Plugin element, [int start]) { |
| 16964 if (start == null) start = length - 1; |
| 16965 return Lists.lastIndexOf(this, element, start); |
| 16966 } |
| 16967 |
| 16968 Plugin get first { |
| 16969 if (this.length > 0) return this[0]; |
| 16970 throw new StateError("No elements"); |
| 16971 } |
| 16972 |
| 16973 Plugin get last { |
| 16974 if (this.length > 0) return this[this.length - 1]; |
| 16975 throw new StateError("No elements"); |
| 16976 } |
| 16977 |
| 16978 Plugin get single { |
| 16979 if (length == 1) return this[0]; |
| 16980 if (length == 0) throw new StateError("No elements"); |
| 16981 throw new StateError("More than one element"); |
| 16982 } |
| 16983 |
| 16984 void insert(int index, Plugin element) { |
| 16985 throw new UnsupportedError("Cannot add to immutable List."); |
| 16986 } |
| 16987 |
| 16988 void insertAll(int index, Iterable<Plugin> iterable) { |
| 16989 throw new UnsupportedError("Cannot add to immutable List."); |
| 16990 } |
| 16991 |
| 16992 void setAll(int index, Iterable<Plugin> iterable) { |
| 16993 throw new UnsupportedError("Cannot modify an immutable List."); |
| 16994 } |
| 16995 |
| 16996 Plugin removeAt(int pos) { |
| 16997 throw new UnsupportedError("Cannot remove from immutable List."); |
| 16998 } |
| 16999 |
| 17000 Plugin removeLast() { |
| 17001 throw new UnsupportedError("Cannot remove from immutable List."); |
| 17002 } |
| 17003 |
| 17004 bool remove(Object object) { |
| 17005 throw new UnsupportedError("Cannot remove from immutable List."); |
| 17006 } |
| 17007 |
| 17008 void removeWhere(bool test(Plugin element)) { |
| 17009 throw new UnsupportedError("Cannot remove from immutable List."); |
| 17010 } |
| 17011 |
| 17012 void retainWhere(bool test(Plugin element)) { |
| 17013 throw new UnsupportedError("Cannot remove from immutable List."); |
| 17014 } |
| 17015 |
| 17016 void setRange(int start, int end, Iterable<Plugin> iterable, [int skipCount=0]
) { |
| 17017 throw new UnsupportedError("Cannot setRange on immutable List."); |
| 17018 } |
| 17019 |
| 17020 void removeRange(int start, int end) { |
| 17021 throw new UnsupportedError("Cannot removeRange on immutable List."); |
| 17022 } |
| 17023 |
| 17024 void replaceRange(int start, int end, Iterable<Plugin> iterable) { |
| 17025 throw new UnsupportedError("Cannot modify an immutable List."); |
| 17026 } |
| 17027 |
| 17028 void fillRange(int start, int end, [Plugin fillValue]) { |
| 17029 throw new UnsupportedError("Cannot modify an immutable List."); |
| 17030 } |
| 17031 |
| 17032 Iterable<Plugin> getRange(int start, int end) => |
| 17033 IterableMixinWorkaround.getRangeList(this, start, end); |
| 17034 |
| 17035 List<Plugin> sublist(int start, [int end]) { |
| 17036 if (end == null) end = length; |
| 17037 return Lists.getRange(this, start, end, <Plugin>[]); |
| 17038 } |
| 17039 |
| 17040 Map<int, Plugin> asMap() => |
| 17041 IterableMixinWorkaround.asMapList(this); |
| 17042 |
| 17043 String toString() { |
| 17044 StringBuffer buffer = new StringBuffer('['); |
| 17045 buffer.writeAll(this, ', '); |
| 17046 buffer.write(']'); |
| 17047 return buffer.toString(); |
| 17048 } |
| 17049 |
| 17050 // -- end List<Plugin> mixins. |
| 17051 |
| 17052 @DomName('DOMPluginArray.item') |
| 17053 @DocsEditable |
| 17054 Plugin item(int index) native; |
| 17055 |
| 17056 @DomName('DOMPluginArray.namedItem') |
| 17057 @DocsEditable |
| 17058 Plugin namedItem(String name) native; |
| 17059 |
| 17060 @DomName('DOMPluginArray.refresh') |
| 17061 @DocsEditable |
| 17062 void refresh(bool reload) native; |
| 17063 } |
| 17064 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 17065 // for details. All rights reserved. Use of this source code is governed by a |
| 17201 // BSD-style license that can be found in the LICENSE file. | 17066 // BSD-style license that can be found in the LICENSE file. |
| 17202 | 17067 |
| 17203 | 17068 |
| 17204 @DocsEditable | 17069 @DocsEditable |
| 17205 @DomName('PopStateEvent') | 17070 @DomName('PopStateEvent') |
| 17206 @SupportedBrowser(SupportedBrowser.CHROME) | 17071 @SupportedBrowser(SupportedBrowser.CHROME) |
| 17207 @SupportedBrowser(SupportedBrowser.FIREFOX) | 17072 @SupportedBrowser(SupportedBrowser.FIREFOX) |
| 17208 @SupportedBrowser(SupportedBrowser.IE, '10') | 17073 @SupportedBrowser(SupportedBrowser.IE, '10') |
| 17209 @SupportedBrowser(SupportedBrowser.SAFARI) | 17074 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 17210 class PopStateEvent extends Event native "PopStateEvent" { | 17075 class PopStateEvent extends Event native "PopStateEvent" { |
| (...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18357 @DomName('ScriptProfileNode.children') | 18222 @DomName('ScriptProfileNode.children') |
| 18358 @DocsEditable | 18223 @DocsEditable |
| 18359 List<ScriptProfileNode> children() native; | 18224 List<ScriptProfileNode> children() native; |
| 18360 } | 18225 } |
| 18361 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 18226 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 18362 // for details. All rights reserved. Use of this source code is governed by a | 18227 // for details. All rights reserved. Use of this source code is governed by a |
| 18363 // BSD-style license that can be found in the LICENSE file. | 18228 // BSD-style license that can be found in the LICENSE file. |
| 18364 | 18229 |
| 18365 | 18230 |
| 18366 @DocsEditable | 18231 @DocsEditable |
| 18232 @DomName('SecurityPolicy') |
| 18233 class SecurityPolicy native "SecurityPolicy" { |
| 18234 |
| 18235 @DomName('DOMSecurityPolicy.allowsEval') |
| 18236 @DocsEditable |
| 18237 final bool allowsEval; |
| 18238 |
| 18239 @DomName('DOMSecurityPolicy.allowsInlineScript') |
| 18240 @DocsEditable |
| 18241 final bool allowsInlineScript; |
| 18242 |
| 18243 @DomName('DOMSecurityPolicy.allowsInlineStyle') |
| 18244 @DocsEditable |
| 18245 final bool allowsInlineStyle; |
| 18246 |
| 18247 @DomName('DOMSecurityPolicy.isActive') |
| 18248 @DocsEditable |
| 18249 final bool isActive; |
| 18250 |
| 18251 @DomName('DOMSecurityPolicy.reportURIs') |
| 18252 @DocsEditable |
| 18253 @Returns('DomStringList') |
| 18254 @Creates('DomStringList') |
| 18255 final List<String> reportURIs; |
| 18256 |
| 18257 @DomName('DOMSecurityPolicy.allowsConnectionTo') |
| 18258 @DocsEditable |
| 18259 bool allowsConnectionTo(String url) native; |
| 18260 |
| 18261 @DomName('DOMSecurityPolicy.allowsFontFrom') |
| 18262 @DocsEditable |
| 18263 bool allowsFontFrom(String url) native; |
| 18264 |
| 18265 @DomName('DOMSecurityPolicy.allowsFormAction') |
| 18266 @DocsEditable |
| 18267 bool allowsFormAction(String url) native; |
| 18268 |
| 18269 @DomName('DOMSecurityPolicy.allowsFrameFrom') |
| 18270 @DocsEditable |
| 18271 bool allowsFrameFrom(String url) native; |
| 18272 |
| 18273 @DomName('DOMSecurityPolicy.allowsImageFrom') |
| 18274 @DocsEditable |
| 18275 bool allowsImageFrom(String url) native; |
| 18276 |
| 18277 @DomName('DOMSecurityPolicy.allowsMediaFrom') |
| 18278 @DocsEditable |
| 18279 bool allowsMediaFrom(String url) native; |
| 18280 |
| 18281 @DomName('DOMSecurityPolicy.allowsObjectFrom') |
| 18282 @DocsEditable |
| 18283 bool allowsObjectFrom(String url) native; |
| 18284 |
| 18285 @DomName('DOMSecurityPolicy.allowsPluginType') |
| 18286 @DocsEditable |
| 18287 bool allowsPluginType(String type) native; |
| 18288 |
| 18289 @DomName('DOMSecurityPolicy.allowsScriptFrom') |
| 18290 @DocsEditable |
| 18291 bool allowsScriptFrom(String url) native; |
| 18292 |
| 18293 @DomName('DOMSecurityPolicy.allowsStyleFrom') |
| 18294 @DocsEditable |
| 18295 bool allowsStyleFrom(String url) native; |
| 18296 } |
| 18297 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 18298 // for details. All rights reserved. Use of this source code is governed by a |
| 18299 // BSD-style license that can be found in the LICENSE file. |
| 18300 |
| 18301 |
| 18302 @DocsEditable |
| 18367 @DomName('SecurityPolicyViolationEvent') | 18303 @DomName('SecurityPolicyViolationEvent') |
| 18368 class SecurityPolicyViolationEvent extends Event native "SecurityPolicyViolation
Event" { | 18304 class SecurityPolicyViolationEvent extends Event native "SecurityPolicyViolation
Event" { |
| 18369 | 18305 |
| 18370 @JSName('blockedURI') | 18306 @JSName('blockedURI') |
| 18371 @DomName('SecurityPolicyViolationEvent.blockedURI') | 18307 @DomName('SecurityPolicyViolationEvent.blockedURI') |
| 18372 @DocsEditable | 18308 @DocsEditable |
| 18373 final String blockedUri; | 18309 final String blockedUri; |
| 18374 | 18310 |
| 18375 @JSName('documentURI') | 18311 @JSName('documentURI') |
| 18376 @DomName('SecurityPolicyViolationEvent.documentURI') | 18312 @DomName('SecurityPolicyViolationEvent.documentURI') |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18508 return [this.options[this.selectedIndex]]; | 18444 return [this.options[this.selectedIndex]]; |
| 18509 } | 18445 } |
| 18510 } | 18446 } |
| 18511 } | 18447 } |
| 18512 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 18448 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 18513 // for details. All rights reserved. Use of this source code is governed by a | 18449 // for details. All rights reserved. Use of this source code is governed by a |
| 18514 // BSD-style license that can be found in the LICENSE file. | 18450 // BSD-style license that can be found in the LICENSE file. |
| 18515 | 18451 |
| 18516 | 18452 |
| 18517 @DocsEditable | 18453 @DocsEditable |
| 18454 @DomName('Selection') |
| 18455 class Selection native "Selection" { |
| 18456 |
| 18457 @DomName('DOMSelection.anchorNode') |
| 18458 @DocsEditable |
| 18459 final Node anchorNode; |
| 18460 |
| 18461 @DomName('DOMSelection.anchorOffset') |
| 18462 @DocsEditable |
| 18463 final int anchorOffset; |
| 18464 |
| 18465 @DomName('DOMSelection.baseNode') |
| 18466 @DocsEditable |
| 18467 final Node baseNode; |
| 18468 |
| 18469 @DomName('DOMSelection.baseOffset') |
| 18470 @DocsEditable |
| 18471 final int baseOffset; |
| 18472 |
| 18473 @DomName('DOMSelection.extentNode') |
| 18474 @DocsEditable |
| 18475 final Node extentNode; |
| 18476 |
| 18477 @DomName('DOMSelection.extentOffset') |
| 18478 @DocsEditable |
| 18479 final int extentOffset; |
| 18480 |
| 18481 @DomName('DOMSelection.focusNode') |
| 18482 @DocsEditable |
| 18483 final Node focusNode; |
| 18484 |
| 18485 @DomName('DOMSelection.focusOffset') |
| 18486 @DocsEditable |
| 18487 final int focusOffset; |
| 18488 |
| 18489 @DomName('DOMSelection.isCollapsed') |
| 18490 @DocsEditable |
| 18491 final bool isCollapsed; |
| 18492 |
| 18493 @DomName('DOMSelection.rangeCount') |
| 18494 @DocsEditable |
| 18495 final int rangeCount; |
| 18496 |
| 18497 @DomName('DOMSelection.type') |
| 18498 @DocsEditable |
| 18499 final String type; |
| 18500 |
| 18501 @DomName('DOMSelection.addRange') |
| 18502 @DocsEditable |
| 18503 void addRange(Range range) native; |
| 18504 |
| 18505 @DomName('DOMSelection.collapse') |
| 18506 @DocsEditable |
| 18507 void collapse(Node node, int index) native; |
| 18508 |
| 18509 @DomName('DOMSelection.collapseToEnd') |
| 18510 @DocsEditable |
| 18511 void collapseToEnd() native; |
| 18512 |
| 18513 @DomName('DOMSelection.collapseToStart') |
| 18514 @DocsEditable |
| 18515 void collapseToStart() native; |
| 18516 |
| 18517 @DomName('DOMSelection.containsNode') |
| 18518 @DocsEditable |
| 18519 bool containsNode(Node node, bool allowPartial) native; |
| 18520 |
| 18521 @DomName('DOMSelection.deleteFromDocument') |
| 18522 @DocsEditable |
| 18523 void deleteFromDocument() native; |
| 18524 |
| 18525 @DomName('DOMSelection.empty') |
| 18526 @DocsEditable |
| 18527 void empty() native; |
| 18528 |
| 18529 @DomName('DOMSelection.extend') |
| 18530 @DocsEditable |
| 18531 void extend(Node node, int offset) native; |
| 18532 |
| 18533 @DomName('DOMSelection.getRangeAt') |
| 18534 @DocsEditable |
| 18535 Range getRangeAt(int index) native; |
| 18536 |
| 18537 @DomName('DOMSelection.modify') |
| 18538 @DocsEditable |
| 18539 void modify(String alter, String direction, String granularity) native; |
| 18540 |
| 18541 @DomName('DOMSelection.removeAllRanges') |
| 18542 @DocsEditable |
| 18543 void removeAllRanges() native; |
| 18544 |
| 18545 @DomName('DOMSelection.selectAllChildren') |
| 18546 @DocsEditable |
| 18547 void selectAllChildren(Node node) native; |
| 18548 |
| 18549 @DomName('DOMSelection.setBaseAndExtent') |
| 18550 @DocsEditable |
| 18551 void setBaseAndExtent(Node baseNode, int baseOffset, Node extentNode, int exte
ntOffset) native; |
| 18552 |
| 18553 @DomName('DOMSelection.setPosition') |
| 18554 @DocsEditable |
| 18555 void setPosition(Node node, int offset) native; |
| 18556 |
| 18557 @DomName('DOMSelection.toString') |
| 18558 @DocsEditable |
| 18559 String toString() native; |
| 18560 } |
| 18561 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 18562 // for details. All rights reserved. Use of this source code is governed by a |
| 18563 // BSD-style license that can be found in the LICENSE file. |
| 18564 |
| 18565 |
| 18566 @DocsEditable |
| 18518 @DomName('HTMLShadowElement') | 18567 @DomName('HTMLShadowElement') |
| 18519 @SupportedBrowser(SupportedBrowser.CHROME, '26') | 18568 @SupportedBrowser(SupportedBrowser.CHROME, '26') |
| 18520 @Experimental | 18569 @Experimental |
| 18521 class ShadowElement extends Element native "HTMLShadowElement" { | 18570 class ShadowElement extends Element native "HTMLShadowElement" { |
| 18522 | 18571 |
| 18523 /// Checks if this type is supported on the current platform. | 18572 /// Checks if this type is supported on the current platform. |
| 18524 static bool get supported => Element.isTagSupported('shadow'); | 18573 static bool get supported => Element.isTagSupported('shadow'); |
| 18525 | 18574 |
| 18526 @DomName('HTMLShadowElement.olderShadowRoot') | 18575 @DomName('HTMLShadowElement.olderShadowRoot') |
| 18527 @DocsEditable | 18576 @DocsEditable |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18580 List<Node> getElementsByClassName(String className) native; | 18629 List<Node> getElementsByClassName(String className) native; |
| 18581 | 18630 |
| 18582 @DomName('ShadowRoot.getElementsByTagName') | 18631 @DomName('ShadowRoot.getElementsByTagName') |
| 18583 @DocsEditable | 18632 @DocsEditable |
| 18584 @Returns('NodeList') | 18633 @Returns('NodeList') |
| 18585 @Creates('NodeList') | 18634 @Creates('NodeList') |
| 18586 List<Node> getElementsByTagName(String tagName) native; | 18635 List<Node> getElementsByTagName(String tagName) native; |
| 18587 | 18636 |
| 18588 @DomName('ShadowRoot.getSelection') | 18637 @DomName('ShadowRoot.getSelection') |
| 18589 @DocsEditable | 18638 @DocsEditable |
| 18590 DomSelection getSelection() native; | 18639 Selection getSelection() native; |
| 18591 | 18640 |
| 18592 static bool get supported => | 18641 static bool get supported => |
| 18593 JS('bool', '!!(Element.prototype.webkitCreateShadowRoot)'); | 18642 JS('bool', '!!(Element.prototype.webkitCreateShadowRoot)'); |
| 18594 } | 18643 } |
| 18595 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 18644 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 18596 // for details. All rights reserved. Use of this source code is governed by a | 18645 // for details. All rights reserved. Use of this source code is governed by a |
| 18597 // BSD-style license that can be found in the LICENSE file. | 18646 // BSD-style license that can be found in the LICENSE file. |
| 18598 | 18647 |
| 18599 | 18648 |
| 18600 @DocsEditable | 18649 @DocsEditable |
| (...skipping 3116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21717 // WARNING: Do not edit - generated code. | 21766 // WARNING: Do not edit - generated code. |
| 21718 | 21767 |
| 21719 | 21768 |
| 21720 typedef void VoidCallback(); | 21769 typedef void VoidCallback(); |
| 21721 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 21770 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 21722 // for details. All rights reserved. Use of this source code is governed by a | 21771 // for details. All rights reserved. Use of this source code is governed by a |
| 21723 // BSD-style license that can be found in the LICENSE file. | 21772 // BSD-style license that can be found in the LICENSE file. |
| 21724 | 21773 |
| 21725 | 21774 |
| 21726 @DocsEditable | 21775 @DocsEditable |
| 21727 @DomName('WebKitCSSFilterRule') | |
| 21728 class WebKitCssFilterRule extends CssRule native "WebKitCSSFilterRule" { | |
| 21729 | |
| 21730 @DomName('WebKitCSSFilterRule.style') | |
| 21731 @DocsEditable | |
| 21732 final CssStyleDeclaration style; | |
| 21733 } | |
| 21734 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 21735 // for details. All rights reserved. Use of this source code is governed by a | |
| 21736 // BSD-style license that can be found in the LICENSE file. | |
| 21737 | |
| 21738 | |
| 21739 @DocsEditable | |
| 21740 @DomName('WebKitCSSRegionRule') | |
| 21741 class WebKitCssRegionRule extends CssRule native "WebKitCSSRegionRule" { | |
| 21742 | |
| 21743 @DomName('WebKitCSSRegionRule.cssRules') | |
| 21744 @DocsEditable | |
| 21745 @Returns('_CssRuleList') | |
| 21746 @Creates('_CssRuleList') | |
| 21747 final List<CssRule> cssRules; | |
| 21748 } | |
| 21749 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 21750 // for details. All rights reserved. Use of this source code is governed by a | |
| 21751 // BSD-style license that can be found in the LICENSE file. | |
| 21752 | |
| 21753 | |
| 21754 @DocsEditable | |
| 21755 /** | 21776 /** |
| 21756 * Use the WebSocket interface to connect to a WebSocket, | 21777 * Use the WebSocket interface to connect to a WebSocket, |
| 21757 * and to send and receive data on that WebSocket. | 21778 * and to send and receive data on that WebSocket. |
| 21758 * | 21779 * |
| 21759 * To use a WebSocket in your web app, first create a WebSocket object, | 21780 * To use a WebSocket in your web app, first create a WebSocket object, |
| 21760 * passing the WebSocket URL as an argument to the constructor. | 21781 * passing the WebSocket URL as an argument to the constructor. |
| 21761 * | 21782 * |
| 21762 * var webSocket = new WebSocket('ws://127.0.0.1:1337/ws'); | 21783 * var webSocket = new WebSocket('ws://127.0.0.1:1337/ws'); |
| 21763 * | 21784 * |
| 21764 * To send data on the WebSocket, use the [send] method. | 21785 * To send data on the WebSocket, use the [send] method. |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22718 | 22739 |
| 22719 @JSName('getMatchedCSSRules') | 22740 @JSName('getMatchedCSSRules') |
| 22720 @DomName('DOMWindow.getMatchedCSSRules') | 22741 @DomName('DOMWindow.getMatchedCSSRules') |
| 22721 @DocsEditable | 22742 @DocsEditable |
| 22722 @Returns('_CssRuleList') | 22743 @Returns('_CssRuleList') |
| 22723 @Creates('_CssRuleList') | 22744 @Creates('_CssRuleList') |
| 22724 List<CssRule> getMatchedCssRules(Element element, String pseudoElement) native
; | 22745 List<CssRule> getMatchedCssRules(Element element, String pseudoElement) native
; |
| 22725 | 22746 |
| 22726 @DomName('DOMWindow.getSelection') | 22747 @DomName('DOMWindow.getSelection') |
| 22727 @DocsEditable | 22748 @DocsEditable |
| 22728 DomSelection getSelection() native; | 22749 Selection getSelection() native; |
| 22729 | 22750 |
| 22730 @DomName('DOMWindow.matchMedia') | 22751 @DomName('DOMWindow.matchMedia') |
| 22731 @DocsEditable | 22752 @DocsEditable |
| 22732 MediaQueryList matchMedia(String query) native; | 22753 MediaQueryList matchMedia(String query) native; |
| 22733 | 22754 |
| 22734 @DomName('DOMWindow.moveBy') | 22755 @DomName('DOMWindow.moveBy') |
| 22735 @DocsEditable | 22756 @DocsEditable |
| 22736 void moveBy(num x, num y) native; | 22757 void moveBy(num x, num y) native; |
| 22737 | 22758 |
| 22738 @DomName('DOMWindow.moveTo') | 22759 @DomName('DOMWindow.moveTo') |
| (...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24274 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 24295 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 24275 // for details. All rights reserved. Use of this source code is governed by a | 24296 // for details. All rights reserved. Use of this source code is governed by a |
| 24276 // BSD-style license that can be found in the LICENSE file. | 24297 // BSD-style license that can be found in the LICENSE file. |
| 24277 | 24298 |
| 24278 | 24299 |
| 24279 @DocsEditable | 24300 @DocsEditable |
| 24280 @DomName('WebKitPoint') | 24301 @DomName('WebKitPoint') |
| 24281 @SupportedBrowser(SupportedBrowser.CHROME) | 24302 @SupportedBrowser(SupportedBrowser.CHROME) |
| 24282 @SupportedBrowser(SupportedBrowser.SAFARI) | 24303 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 24283 @Experimental | 24304 @Experimental |
| 24305 @SupportedBrowser(SupportedBrowser.CHROME) |
| 24306 @SupportedBrowser(SupportedBrowser.SAFARI) |
| 24307 @Experimental |
| 24284 class _DomPoint native "WebKitPoint" { | 24308 class _DomPoint native "WebKitPoint" { |
| 24285 | 24309 |
| 24286 @DomName('DOMPoint.DOMPoint') | 24310 @DomName('DOMPoint.DOMPoint') |
| 24287 @DocsEditable | 24311 @DocsEditable |
| 24288 factory _DomPoint(num x, num y) { | 24312 factory _DomPoint(num x, num y) { |
| 24289 return _DomPoint._create_1(x, y); | 24313 return _DomPoint._create_1(x, y); |
| 24290 } | 24314 } |
| 24291 static _DomPoint _create_1(x, y) => JS('_DomPoint', 'new WebKitPoint(#,#)', x,
y); | 24315 static _DomPoint _create_1(x, y) => JS('_DomPoint', 'new WebKitPoint(#,#)', x,
y); |
| 24292 | 24316 |
| 24293 /// Checks if this type is supported on the current platform. | 24317 /// Checks if this type is supported on the current platform. |
| (...skipping 5282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 29576 _position = nextPosition; | 29600 _position = nextPosition; |
| 29577 return true; | 29601 return true; |
| 29578 } | 29602 } |
| 29579 _current = null; | 29603 _current = null; |
| 29580 _position = _array.length; | 29604 _position = _array.length; |
| 29581 return false; | 29605 return false; |
| 29582 } | 29606 } |
| 29583 | 29607 |
| 29584 T get current => _current; | 29608 T get current => _current; |
| 29585 } | 29609 } |
| OLD | NEW |