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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 14017007: Roll IDLs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/dartium/html_dartium.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 17ea0845426038014b97f5e45ccc87ecef736742..9a02534b6e0e636c6b6b73ded011932389035245 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -188,11 +188,11 @@ class AnchorElement extends Element native "*HTMLAnchorElement" {
@DomName('WebKitAnimationEvent')
class AnimationEvent extends Event native "*WebKitAnimationEvent" {
- @DomName('WebKitAnimationEvent.animationName')
+ @DomName('AnimationEvent.animationName')
@DocsEditable
final String animationName;
- @DomName('WebKitAnimationEvent.elapsedTime')
+ @DomName('AnimationEvent.elapsedTime')
@DocsEditable
final num elapsedTime;
}
@@ -5719,6 +5719,14 @@ class DataView extends ArrayBufferView native "*DataView" {
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
+
+
+typedef void DatabaseCallback(database);
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
@DocsEditable
@DomName('HTMLDetailsElement')
@@ -5744,12 +5752,45 @@ class DetailsElement extends Element native "*HTMLDetailsElement" {
@DocsEditable
+@DomName('DeviceAcceleration')
+class DeviceAcceleration native "*DeviceAcceleration" {
+
+ @DomName('DeviceAcceleration.x')
+ @DocsEditable
+ final num x;
+
+ @DomName('DeviceAcceleration.y')
+ @DocsEditable
+ final num y;
+
+ @DomName('DeviceAcceleration.z')
+ @DocsEditable
+ final num z;
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+@DocsEditable
@DomName('DeviceMotionEvent')
class DeviceMotionEvent extends Event native "*DeviceMotionEvent" {
+ @DomName('DeviceMotionEvent.acceleration')
+ @DocsEditable
+ final DeviceAcceleration acceleration;
+
+ @DomName('DeviceMotionEvent.accelerationIncludingGravity')
+ @DocsEditable
+ final DeviceAcceleration accelerationIncludingGravity;
+
@DomName('DeviceMotionEvent.interval')
@DocsEditable
final num interval;
+
+ @DomName('DeviceMotionEvent.rotationRate')
+ @DocsEditable
+ final DeviceRotationRate rotationRate;
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -5797,6 +5838,27 @@ class DeviceOrientationEvent extends Event native "*DeviceOrientationEvent" {
@DocsEditable
+@DomName('DeviceRotationRate')
+class DeviceRotationRate native "*DeviceRotationRate" {
+
+ @DomName('DeviceRotationRate.alpha')
+ @DocsEditable
+ final num alpha;
+
+ @DomName('DeviceRotationRate.beta')
+ @DocsEditable
+ final num beta;
+
+ @DomName('DeviceRotationRate.gamma')
+ @DocsEditable
+ final num gamma;
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+@DocsEditable
@DomName('HTMLDialogElement')
class DialogElement extends Element native "*HTMLDialogElement" {
@@ -7096,11 +7158,11 @@ class DomNamedFlowCollection native "*WebKitNamedFlowCollection" {
@DomName('DOMNamedFlowCollection.item')
@DocsEditable
- WebKitNamedFlow item(int index) native;
+ NamedFlow item(int index) native;
@DomName('DOMNamedFlowCollection.namedItem')
@DocsEditable
- WebKitNamedFlow namedItem(String name) native;
+ NamedFlow namedItem(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -14836,73 +14898,6 @@ class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, L
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
-@DomName('JavaScriptCallFrame')
-class JavaScriptCallFrame native "*JavaScriptCallFrame" {
-
- static const int CATCH_SCOPE = 4;
-
- static const int CLOSURE_SCOPE = 3;
-
- static const int GLOBAL_SCOPE = 0;
-
- static const int LOCAL_SCOPE = 1;
-
- static const int WITH_SCOPE = 2;
-
- @DomName('JavaScriptCallFrame.caller')
- @DocsEditable
- final JavaScriptCallFrame caller;
-
- @DomName('JavaScriptCallFrame.column')
- @DocsEditable
- final int column;
-
- @DomName('JavaScriptCallFrame.functionName')
- @DocsEditable
- final String functionName;
-
- @DomName('JavaScriptCallFrame.line')
- @DocsEditable
- final int line;
-
- @DomName('JavaScriptCallFrame.scopeChain')
- @DocsEditable
- final List scopeChain;
-
- @DomName('JavaScriptCallFrame.sourceID')
- @DocsEditable
- final int sourceID;
-
- @DomName('JavaScriptCallFrame.thisObject')
- @DocsEditable
- final Object thisObject;
-
- @DomName('JavaScriptCallFrame.type')
- @DocsEditable
- final String type;
-
- @DomName('JavaScriptCallFrame.evaluate')
- @DocsEditable
- void evaluate(String script) native;
-
- @DomName('JavaScriptCallFrame.restart')
- @DocsEditable
- Object restart() native;
-
- @DomName('JavaScriptCallFrame.scopeType')
- @DocsEditable
- int scopeType(int scopeIndex) native;
-
- @DomName('JavaScriptCallFrame.setVariableValue')
- @DocsEditable
- Object setVariableValue(int scopeIndex, String variableName, Object newValue) native;
-}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
@DomName('KeyboardEvent')
class KeyboardEvent extends UIEvent native "*KeyboardEvent" {
@@ -15238,6 +15233,10 @@ class Location implements LocationBase native "*Location" {
@DomName('Location.toString')
@DocsEditable
String toString() native;
+
+ @DomName('Location.valueOf')
+ @DocsEditable
+ Object valueOf() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -16892,6 +16891,59 @@ class MutationRecord native "*MutationRecord" {
// BSD-style license that can be found in the LICENSE file.
+@DocsEditable
+@DomName('WebKitNamedFlow')
+class NamedFlow extends EventTarget native "*WebKitNamedFlow" {
+
+ @DomName('NamedFlow.firstEmptyRegionIndex')
+ @DocsEditable
+ final int firstEmptyRegionIndex;
+
+ @DomName('NamedFlow.name')
+ @DocsEditable
+ final String name;
+
+ @DomName('NamedFlow.overset')
+ @DocsEditable
+ final bool overset;
+
+ @JSName('addEventListener')
+ @DomName('NamedFlow.addEventListener')
+ @DocsEditable
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+
+ @DomName('NamedFlow.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
+
+ @DomName('NamedFlow.getContent')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
+ List<Node> getContent() native;
+
+ @DomName('NamedFlow.getRegions')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
+ List<Node> getRegions() native;
+
+ @DomName('NamedFlow.getRegionsByContent')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
+ List<Node> getRegionsByContent(Node contentNode) native;
+
+ @JSName('removeEventListener')
+ @DomName('NamedFlow.removeEventListener')
+ @DocsEditable
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
@DomName('Navigator')
class Navigator native "*Navigator" {
@@ -16983,6 +17035,10 @@ class Navigator native "*Navigator" {
@DocsEditable
final bool cookieEnabled;
+ @DomName('Navigator.doNotTrack')
+ @DocsEditable
+ final String doNotTrack;
+
@DomName('Navigator.geolocation')
@DocsEditable
final Geolocation geolocation;
@@ -19754,6 +19810,38 @@ class RtcStatsResponse native "*RTCStatsResponse" {
@DocsEditable
List<RtcStatsReport> result() native;
}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+typedef void SqlStatementCallback(SqlTransaction transaction, SqlResultSet resultSet);
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+typedef void SqlStatementErrorCallback(SqlTransaction transaction, SqlError error);
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+typedef void SqlTransactionCallback(SqlTransaction transaction);
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+
+typedef void SqlTransactionErrorCallback(SqlError error);
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -19861,77 +19949,6 @@ class ScriptElement extends Element native "*HTMLScriptElement" {
@DocsEditable
-@DomName('ScriptProfile')
-class ScriptProfile native "*ScriptProfile" {
-
- @DomName('ScriptProfile.head')
- @DocsEditable
- final ScriptProfileNode head;
-
- @DomName('ScriptProfile.idleTime')
- @DocsEditable
- final num idleTime;
-
- @DomName('ScriptProfile.title')
- @DocsEditable
- final String title;
-
- @DomName('ScriptProfile.uid')
- @DocsEditable
- final int uid;
-}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
-@DocsEditable
-@DomName('ScriptProfileNode')
-class ScriptProfileNode native "*ScriptProfileNode" {
-
- @JSName('callUID')
- @DomName('ScriptProfileNode.callUID')
- @DocsEditable
- final int callUid;
-
- @DomName('ScriptProfileNode.functionName')
- @DocsEditable
- final String functionName;
-
- @DomName('ScriptProfileNode.lineNumber')
- @DocsEditable
- final int lineNumber;
-
- @DomName('ScriptProfileNode.numberOfCalls')
- @DocsEditable
- final int numberOfCalls;
-
- @DomName('ScriptProfileNode.selfTime')
- @DocsEditable
- final num selfTime;
-
- @DomName('ScriptProfileNode.totalTime')
- @DocsEditable
- final num totalTime;
-
- @DomName('ScriptProfileNode.url')
- @DocsEditable
- final String url;
-
- @DomName('ScriptProfileNode.visible')
- @DocsEditable
- final bool visible;
-
- @DomName('ScriptProfileNode.children')
- @DocsEditable
- List<ScriptProfileNode> children() native;
-}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
-@DocsEditable
@DomName('SecurityPolicyViolationEvent')
class SecurityPolicyViolationEvent extends Event native "*SecurityPolicyViolationEvent" {
@@ -20947,6 +20964,10 @@ class SpeechRecognitionEvent extends Event native "*SpeechRecognitionEvent" {
@DocsEditable
final Document emma;
+ @DomName('SpeechRecognitionEvent.interpretation')
+ @DocsEditable
+ final Document interpretation;
+
@DomName('SpeechRecognitionEvent.resultIndex')
@DocsEditable
final int resultIndex;
@@ -20985,53 +21006,412 @@ class SpeechRecognitionResult native "*SpeechRecognitionResult" {
// BSD-style license that can be found in the LICENSE file.
-/**
- * The type used by the
- * [Window.localStorage] and [Window.sessionStorage] properties.
- * Storage is implemented as a Map&lt;String, String>.
- *
- * To store and get values, use Dart's built-in map syntax:
- *
- * window.localStorage['key1'] = 'val1';
- * window.localStorage['key2'] = 'val2';
- * window.localStorage['key3'] = 'val3';
- * assert(window.localStorage['key3'] == 'val3');
- *
- * You can use [Map](http://api.dartlang.org/dart_core/Map.html) APIs
- * such as containsValue(), clear(), and length:
- *
- * assert(window.localStorage.containsValue('does not exist') == false);
- * window.localStorage.clear();
- * assert(window.localStorage.length == 0);
- *
- * For more examples of using this API, see
- * [localstorage_test.dart](http://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/tests/html/localstorage_test.dart).
- * For details on using the Map API, see the
- * [Maps](http://www.dartlang.org/docs/library-tour/#maps-aka-dictionaries-or-hashes)
- * section of the library tour.
- */
-@DomName('Storage')
-class Storage implements Map<String, String>
- native "*Storage" {
+@DocsEditable
+@DomName('Database')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+@Experimental
+class SqlDatabase native "*Database" {
- // TODO(nweiz): update this when maps support lazy iteration
- bool containsValue(String value) => values.any((e) => e == value);
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => JS('bool', '!!(window.openDatabase)');
- bool containsKey(String key) => $dom_getItem(key) != null;
+ @DomName('Database.version')
+ @DocsEditable
+ final String version;
- String operator [](String key) => $dom_getItem(key);
+ @DomName('Database.changeVersion')
+ @DocsEditable
+ void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallback callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native;
- void operator []=(String key, String value) { $dom_setItem(key, value); }
+ @DomName('Database.readTransaction')
+ @DocsEditable
+ void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native;
- String putIfAbsent(String key, String ifAbsent()) {
- if (!containsKey(key)) this[key] = ifAbsent();
- return this[key];
- }
+ @DomName('Database.transaction')
+ @DocsEditable
+ void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native;
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
- String remove(String key) {
- final value = this[key];
- $dom_removeItem(key);
- return value;
+
+@DocsEditable
+@DomName('SQLError')
+class SqlError native "*SQLError" {
+
+ static const int CONSTRAINT_ERR = 6;
+
+ static const int DATABASE_ERR = 1;
+
+ static const int QUOTA_ERR = 4;
+
+ static const int SYNTAX_ERR = 5;
+
+ static const int TIMEOUT_ERR = 7;
+
+ static const int TOO_LARGE_ERR = 3;
+
+ static const int UNKNOWN_ERR = 0;
+
+ static const int VERSION_ERR = 2;
+
+ @DomName('SQLError.code')
+ @DocsEditable
+ final int code;
+
+ @DomName('SQLError.message')
+ @DocsEditable
+ final String message;
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+@DocsEditable
+@DomName('SQLException')
+class SqlException native "*SQLException" {
+
+ static const int CONSTRAINT_ERR = 6;
+
+ static const int DATABASE_ERR = 1;
+
+ static const int QUOTA_ERR = 4;
+
+ static const int SYNTAX_ERR = 5;
+
+ static const int TIMEOUT_ERR = 7;
+
+ static const int TOO_LARGE_ERR = 3;
+
+ static const int UNKNOWN_ERR = 0;
+
+ static const int VERSION_ERR = 2;
+
+ @DomName('SQLException.code')
+ @DocsEditable
+ final int code;
+
+ @DomName('SQLException.message')
+ @DocsEditable
+ final String message;
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+@DocsEditable
+@DomName('SQLResultSet')
+class SqlResultSet native "*SQLResultSet" {
+
+ @DomName('SQLResultSet.insertId')
+ @DocsEditable
+ final int insertId;
+
+ @DomName('SQLResultSet.rows')
+ @DocsEditable
+ final SqlResultSetRowList rows;
+
+ @DomName('SQLResultSet.rowsAffected')
+ @DocsEditable
+ final int rowsAffected;
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+@DocsEditable
+@DomName('SQLResultSetRowList')
+class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> native "*SQLResultSetRowList" {
+
+ @DomName('SQLResultSetRowList.length')
+ @DocsEditable
+ int get length => JS("int", "#.length", this);
+
+ Map operator[](int index) => this.item(index);
+
+ void operator[]=(int index, Map value) {
+ throw new UnsupportedError("Cannot assign element of immutable List.");
+ }
+ // -- start List<Map> mixins.
+ // Map is the element type.
+
+ // From Iterable<Map>:
+
+ Iterator<Map> get iterator {
+ // Note: NodeLists are not fixed size. And most probably length shouldn't
+ // be cached in both iterator _and_ forEach method. For now caching it
+ // for consistency.
+ return new FixedSizeListIterator<Map>(this);
+ }
+
+ Map reduce(Map combine(Map value, Map element)) {
+ return IterableMixinWorkaround.reduce(this, combine);
+ }
+
+ dynamic fold(dynamic initialValue,
+ dynamic combine(dynamic previousValue, Map element)) {
+ return IterableMixinWorkaround.fold(this, initialValue, combine);
+ }
+
+ bool contains(Map element) => IterableMixinWorkaround.contains(this, element);
+
+ void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f);
+
+ String join([String separator = ""]) =>
+ IterableMixinWorkaround.joinList(this, separator);
+
+ Iterable map(f(Map element)) =>
+ IterableMixinWorkaround.mapList(this, f);
+
+ Iterable<Map> where(bool f(Map element)) =>
+ IterableMixinWorkaround.where(this, f);
+
+ Iterable expand(Iterable f(Map element)) =>
+ IterableMixinWorkaround.expand(this, f);
+
+ bool every(bool f(Map element)) => IterableMixinWorkaround.every(this, f);
+
+ bool any(bool f(Map element)) => IterableMixinWorkaround.any(this, f);
+
+ List<Map> toList({ bool growable: true }) =>
+ new List<Map>.from(this, growable: growable);
+
+ Set<Map> toSet() => new Set<Map>.from(this);
+
+ bool get isEmpty => this.length == 0;
+
+ Iterable<Map> take(int n) => IterableMixinWorkaround.takeList(this, n);
+
+ Iterable<Map> takeWhile(bool test(Map value)) {
+ return IterableMixinWorkaround.takeWhile(this, test);
+ }
+
+ Iterable<Map> skip(int n) => IterableMixinWorkaround.skipList(this, n);
+
+ Iterable<Map> skipWhile(bool test(Map value)) {
+ return IterableMixinWorkaround.skipWhile(this, test);
+ }
+
+ Map firstWhere(bool test(Map value), { Map orElse() }) {
+ return IterableMixinWorkaround.firstWhere(this, test, orElse);
+ }
+
+ Map lastWhere(bool test(Map value), {Map orElse()}) {
+ return IterableMixinWorkaround.lastWhereList(this, test, orElse);
+ }
+
+ Map singleWhere(bool test(Map value)) {
+ return IterableMixinWorkaround.singleWhere(this, test);
+ }
+
+ Map elementAt(int index) {
+ return this[index];
+ }
+
+ // From Collection<Map>:
+
+ void add(Map value) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
+
+ void addAll(Iterable<Map> iterable) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
+
+ // From List<Map>:
+ void set length(int value) {
+ throw new UnsupportedError("Cannot resize immutable List.");
+ }
+
+ void clear() {
+ throw new UnsupportedError("Cannot clear immutable List.");
+ }
+
+ Iterable<Map> get reversed {
+ return IterableMixinWorkaround.reversedList(this);
+ }
+
+ void sort([int compare(Map a, Map b)]) {
+ throw new UnsupportedError("Cannot sort immutable List.");
+ }
+
+ int indexOf(Map element, [int start = 0]) =>
+ Lists.indexOf(this, element, start, this.length);
+
+ int lastIndexOf(Map element, [int start]) {
+ if (start == null) start = length - 1;
+ return Lists.lastIndexOf(this, element, start);
+ }
+
+ Map get first {
+ if (this.length > 0) return this[0];
+ throw new StateError("No elements");
+ }
+
+ Map get last {
+ if (this.length > 0) return this[this.length - 1];
+ throw new StateError("No elements");
+ }
+
+ Map get single {
+ if (length == 1) return this[0];
+ if (length == 0) throw new StateError("No elements");
+ throw new StateError("More than one element");
+ }
+
+ void insert(int index, Map element) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
+
+ void insertAll(int index, Iterable<Map> iterable) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
+
+ void setAll(int index, Iterable<Map> iterable) {
+ throw new UnsupportedError("Cannot modify an immutable List.");
+ }
+
+ Map removeAt(int pos) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ Map removeLast() {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void remove(Object object) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void removeWhere(bool test(Map element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void retainWhere(bool test(Map element)) {
+ throw new UnsupportedError("Cannot remove from immutable List.");
+ }
+
+ void setRange(int start, int end, Iterable<Map> iterable, [int skipCount]) {
+ throw new UnsupportedError("Cannot setRange on immutable List.");
+ }
+
+ void removeRange(int start, int end) {
+ throw new UnsupportedError("Cannot removeRange on immutable List.");
+ }
+
+ void replaceRange(int start, int end, Iterable<Map> iterable) {
+ throw new UnsupportedError("Cannot modify an immutable List.");
+ }
+
+ void fillRange(int start, int end, [Map fillValue]) {
+ throw new UnsupportedError("Cannot modify an immutable List.");
+ }
+
+ Iterable<Map> getRange(int start, int end) =>
+ IterableMixinWorkaround.getRangeList(this, start, end);
+
+ List<Map> sublist(int start, [int end]) {
+ if (end == null) end = length;
+ return Lists.getRange(this, start, end, <Map>[]);
+ }
+
+ Map<int, Map> asMap() =>
+ IterableMixinWorkaround.asMapList(this);
+
+ String toString() {
+ StringBuffer buffer = new StringBuffer('[');
+ buffer.writeAll(this, ', ');
+ buffer.write(']');
+ return buffer.toString();
+ }
+
+ // -- end List<Map> mixins.
+
+ @DomName('SQLResultSetRowList.item')
+ @DocsEditable
+ @Creates('=Object')
+ Map item(int index) {
+ return convertNativeToDart_Dictionary(_item_1(index));
+ }
+ @JSName('item')
+ @DomName('SQLResultSetRowList.item')
+ @DocsEditable
+ @Creates('=Object')
+ _item_1(index) native;
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+@DocsEditable
+@DomName('SQLTransaction')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+@Experimental
+class SqlTransaction native "*SQLTransaction" {
+
+ @DomName('SQLTransaction.executeSql')
+ @DocsEditable
+ void executeSql(String sqlStatement, List arguments, [SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) native;
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+/**
+ * The type used by the
+ * [Window.localStorage] and [Window.sessionStorage] properties.
+ * Storage is implemented as a Map&lt;String, String>.
+ *
+ * To store and get values, use Dart's built-in map syntax:
+ *
+ * window.localStorage['key1'] = 'val1';
+ * window.localStorage['key2'] = 'val2';
+ * window.localStorage['key3'] = 'val3';
+ * assert(window.localStorage['key3'] == 'val3');
+ *
+ * You can use [Map](http://api.dartlang.org/dart_core/Map.html) APIs
+ * such as containsValue(), clear(), and length:
+ *
+ * assert(window.localStorage.containsValue('does not exist') == false);
+ * window.localStorage.clear();
+ * assert(window.localStorage.length == 0);
+ *
+ * For more examples of using this API, see
+ * [localstorage_test.dart](http://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/tests/html/localstorage_test.dart).
+ * For details on using the Map API, see the
+ * [Maps](http://www.dartlang.org/docs/library-tour/#maps-aka-dictionaries-or-hashes)
+ * section of the library tour.
+ */
+@DomName('Storage')
+class Storage implements Map<String, String>
+ native "*Storage" {
+
+ // TODO(nweiz): update this when maps support lazy iteration
+ bool containsValue(String value) => values.any((e) => e == value);
+
+ bool containsKey(String key) => $dom_getItem(key) != null;
+
+ String operator [](String key) => $dom_getItem(key);
+
+ void operator []=(String key, String value) { $dom_setItem(key, value); }
+
+ String putIfAbsent(String key, String ifAbsent()) {
+ if (!containsKey(key)) this[key] = ifAbsent();
+ return this[key];
+ }
+
+ String remove(String key) {
+ final value = this[key];
+ $dom_removeItem(key);
+ return value;
}
void clear() => $dom_clear();
@@ -24262,59 +24642,6 @@ class WebKitCssRegionRule extends CssRule native "*WebKitCSSRegionRule" {
@DocsEditable
-@DomName('WebKitNamedFlow')
-class WebKitNamedFlow extends EventTarget native "*WebKitNamedFlow" {
-
- @DomName('WebKitNamedFlow.firstEmptyRegionIndex')
- @DocsEditable
- final int firstEmptyRegionIndex;
-
- @DomName('WebKitNamedFlow.name')
- @DocsEditable
- final String name;
-
- @DomName('WebKitNamedFlow.overset')
- @DocsEditable
- final bool overset;
-
- @JSName('addEventListener')
- @DomName('WebKitNamedFlow.addEventListener')
- @DocsEditable
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
-
- @DomName('WebKitNamedFlow.dispatchEvent')
- @DocsEditable
- bool dispatchEvent(Event event) native;
-
- @DomName('WebKitNamedFlow.getContent')
- @DocsEditable
- @Returns('NodeList')
- @Creates('NodeList')
- List<Node> getContent() native;
-
- @DomName('WebKitNamedFlow.getRegions')
- @DocsEditable
- @Returns('NodeList')
- @Creates('NodeList')
- List<Node> getRegions() native;
-
- @DomName('WebKitNamedFlow.getRegionsByContent')
- @DocsEditable
- @Returns('NodeList')
- @Creates('NodeList')
- List<Node> getRegionsByContent(Node contentNode) native;
-
- @JSName('removeEventListener')
- @DomName('WebKitNamedFlow.removeEventListener')
- @DocsEditable
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
-}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
-@DocsEditable
/**
* Use the WebSocket interface to connect to a WebSocket,
* and to send and receive data on that WebSocket.
@@ -25386,6 +25713,10 @@ class Window extends EventTarget implements WindowBase native "@*DOMWindow" {
@DocsEditable
void stop() native;
+ @DomName('DOMWindow.toString')
+ @DocsEditable
+ String toString() native;
+
@JSName('webkitConvertPointFromNodeToPage')
@DomName('DOMWindow.webkitConvertPointFromNodeToPage')
@DocsEditable
@@ -26801,6 +27132,18 @@ abstract class _DOMFileSystemSync native "*DOMFileSystemSync" {
@DocsEditable
+@DomName('DatabaseSync')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+@Experimental
+abstract class _DatabaseSync native "*DatabaseSync" {
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+@DocsEditable
@DomName('DedicatedWorkerContext')
abstract class _DedicatedWorkerContext extends _WorkerContext native "*DedicatedWorkerContext" {
}
@@ -26834,7 +27177,7 @@ abstract class _DirectoryReaderSync native "*DirectoryReaderSync" {
@Experimental
class _DomPoint native "*WebKitPoint" {
- @DomName('WebKitPoint.WebKitPoint')
+ @DomName('DOMPoint.DOMPoint')
@DocsEditable
factory _DomPoint(num x, num y) {
return _DomPoint._create_1(x, y);
@@ -26844,11 +27187,11 @@ class _DomPoint native "*WebKitPoint" {
/// Checks if this type is supported on the current platform.
static bool get supported => JS('bool', '!!(window.WebKitPoint)');
- @DomName('WebKitPoint.x')
+ @DomName('DOMPoint.x')
@DocsEditable
num x;
- @DomName('WebKitPoint.y')
+ @DomName('DOMPoint.y')
@DocsEditable
num y;
}
@@ -27874,6 +28217,18 @@ abstract class _Rect native "*Rect" {
@DocsEditable
+@DomName('SQLTransactionSync')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+@Experimental
+abstract class _SQLTransactionSync native "*SQLTransactionSync" {
+}
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+@DocsEditable
@DomName('SharedWorker')
abstract class _SharedWorker extends AbstractWorker native "*SharedWorker" {
@@ -28603,28 +28958,6 @@ abstract class _WebKitCSSTransformValue extends _CssValueList native "*WebKitCSS
// BSD-style license that can be found in the LICENSE file.
-// This class maps WebKitTransitionEvent to TransitionEvent for older Chrome
-// browser versions.
-@DomName('WebKitTransitionEvent')
-class _WebKitTransitionEvent extends Event implements TransitionEvent native "*WebKitTransitionEvent" {
-
- @DomName('WebKitTransitionEvent.elapsedTime')
- @DocsEditable
- final num elapsedTime;
-
- @DomName('WebKitTransitionEvent.propertyName')
- @DocsEditable
- final String propertyName;
-
- @DomName('WebKitTransitionEvent.pseudoElement')
- @DocsEditable
- final String pseudoElement;
-}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-
@DocsEditable
@DomName('WorkerContext')
abstract class _WorkerContext extends EventTarget native "*WorkerContext" {
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/dartium/html_dartium.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698