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

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

Issue 11642035: Renaming Window to WindowBase and LocalWindow to Window. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/scripts/htmlrenamer.py » ('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 8248f786924e1eb7910a998764ce57f46006169e..ea7f8344389f3292d3a82979395fd91fcd6422ee 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -21,7 +21,7 @@ import 'dart:web_audio' as web_audio;
-LocalWindow get window => JS('LocalWindow', 'window');
+Window get window => JS('Window', 'window');
HtmlDocument get document => JS('Document', 'document');
@@ -1379,7 +1379,7 @@ class CompositionEvent extends UIEvent native "*CompositionEvent" {
final String data;
/// @domName CompositionEvent.initCompositionEvent; @docsEditable true
- void initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, LocalWindow viewArg, String dataArg) native;
+ void initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) 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
@@ -5760,11 +5760,10 @@ class Document extends Node native "*Document"
/// @domName Document.cookie; @docsEditable true
String cookie;
- /// Returns the [Window] associated with the document.
/// @domName Document.defaultView; @docsEditable true
- Window get window => _convertNativeToDart_Window(this._window);
+ WindowBase get window => _convertNativeToDart_Window(this._window);
@JSName('defaultView')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
+ @Creates('Window|=Object') @Returns('Window|=Object')
final dynamic _window;
/// @domName Document.documentElement; @docsEditable true
@@ -5877,12 +5876,12 @@ class Document extends Node native "*Document"
Text $dom_createTextNode(String data) native;
/// @domName Document.createTouch; @docsEditable true
- Touch $dom_createTouch(LocalWindow window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) {
+ Touch $dom_createTouch(Window window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) {
var target_1 = _convertDartToNative_EventTarget(target);
return _$dom_createTouch_1(window, target_1, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce);
}
@JSName('createTouch')
- Touch _$dom_createTouch_1(LocalWindow window, target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native;
+ Touch _$dom_createTouch_1(Window window, target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native;
/// Use the [TouchList] constructor isntead.
/// @domName Document.createTouchList; @docsEditable true
@@ -9516,9 +9515,9 @@ class FormElement extends Element native "*HTMLFormElement" {
class FrameElement extends Element native "*HTMLFrameElement" {
/// @domName HTMLFrameElement.contentWindow; @docsEditable true
- Window get contentWindow => _convertNativeToDart_Window(this._contentWindow);
+ WindowBase get contentWindow => _convertNativeToDart_Window(this._contentWindow);
@JSName('contentWindow')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
+ @Creates('Window|=Object') @Returns('Window|=Object')
final dynamic _contentWindow;
/// @domName HTMLFrameElement.frameBorder; @docsEditable true
@@ -9761,6 +9760,38 @@ class HeadingElement extends Element native "*HTMLHeadingElement" {
// BSD-style license that can be found in the LICENSE file.
+/// @domName History; @docsEditable true
+class History implements HistoryBase native "*History" {
+
+ /// @domName History.length; @docsEditable true
+ final int length;
+
+ /// @domName History.state; @docsEditable true
+ dynamic get state => _convertNativeToDart_SerializedScriptValue(this._state);
+ @JSName('state')
+ @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
+ final dynamic _state;
+
+ /// @domName History.back; @docsEditable true
+ void back() native;
+
+ /// @domName History.forward; @docsEditable true
+ void forward() native;
+
+ /// @domName History.go; @docsEditable true
+ void go(int distance) native;
+
+ /// @domName History.pushState; @docsEditable true
+ void pushState(Object data, String title, [String url]) native;
+
+ /// @domName History.replaceState; @docsEditable true
+ void replaceState(Object data, String title, [String url]) 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 HTMLAllCollection; @docsEditable true
class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native "*HTMLAllCollection" {
@@ -10581,9 +10612,9 @@ class IFrameElement extends Element native "*HTMLIFrameElement" {
String align;
/// @domName HTMLIFrameElement.contentWindow; @docsEditable true
- Window get contentWindow => _convertNativeToDart_Window(this._contentWindow);
+ WindowBase get contentWindow => _convertNativeToDart_Window(this._contentWindow);
@JSName('contentWindow')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
+ @Creates('Window|=Object') @Returns('Window|=Object')
final dynamic _contentWindow;
/// @domName HTMLIFrameElement.frameBorder; @docsEditable true
@@ -11864,7 +11895,7 @@ class JavaScriptCallFrame native "*JavaScriptCallFrame" {
class KeyboardEvent extends UIEvent native "*KeyboardEvent" {
factory KeyboardEvent(String type, Window view,
- [bool canBubble = true, bool cancelable = true,
+ [bool canBubble = true, bool cancelable = true,
String keyIdentifier = "", int keyLocation = 1, bool ctrlKey = false,
bool altKey = false, bool shiftKey = false, bool metaKey = false,
bool altGraphKey = false]) {
@@ -11876,7 +11907,7 @@ class KeyboardEvent extends UIEvent native "*KeyboardEvent" {
/** @domName KeyboardEvent.initKeyboardEvent */
void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable,
- LocalWindow view, String keyIdentifier, int keyLocation, bool ctrlKey,
+ Window view, String keyIdentifier, int keyLocation, bool ctrlKey,
bool altKey, bool shiftKey, bool metaKey, bool altGraphKey) {
if (JS('bool', 'typeof(#.initKeyEvent) == "function"', this)) {
// initKeyEvent is only in Firefox (instead of initKeyboardEvent). It has
@@ -11884,7 +11915,7 @@ class KeyboardEvent extends UIEvent native "*KeyboardEvent" {
// charCode as the last two arguments, but we just set them as the default
// since they can't be specified in other browsers.
JS('void', '#.initKeyEvent(#, #, #, #, #, #, #, #, 0, 0)', this,
- type, canBubble, cancelable, view,
+ type, canBubble, cancelable, view,
ctrlKey, altKey, shiftKey, metaKey);
} else {
// initKeyboardEvent is for all other browsers.
@@ -12077,32 +12108,11 @@ class LinkElement extends Element native "*HTMLLinkElement" {
// BSD-style license that can be found in the LICENSE file.
-/// @domName History; @docsEditable true
-class LocalHistory implements History native "*History" {
-
- /// @domName History.length; @docsEditable true
- final int length;
-
- /// @domName History.state; @docsEditable true
- dynamic get state => _convertNativeToDart_SerializedScriptValue(this._state);
- @JSName('state')
- @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
- final dynamic _state;
-
- /// @domName History.back; @docsEditable true
- void back() native;
-
- /// @domName History.forward; @docsEditable true
- void forward() native;
-
- /// @domName History.go; @docsEditable true
- void go(int distance) native;
-
- /// @domName History.pushState; @docsEditable true
- void pushState(Object data, String title, [String url]) native;
+/// @domName LocalMediaStream; @docsEditable true
+class LocalMediaStream extends MediaStream implements EventTarget native "*LocalMediaStream" {
- /// @domName History.replaceState; @docsEditable true
- void replaceState(Object data, String title, [String url]) native;
+ /// @domName LocalMediaStream.stop; @docsEditable true
+ void stop() 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
@@ -12110,7 +12120,7 @@ class LocalHistory implements History native "*History" {
/// @domName Location; @docsEditable true
-class LocalLocation implements Location native "*Location" {
+class Location implements LocationBase native "*Location" {
/// @domName Location.ancestorOrigins; @docsEditable true
@Returns('DomStringList') @Creates('DomStringList')
@@ -12160,508 +12170,287 @@ class LocalLocation implements Location native "*Location" {
// BSD-style license that can be found in the LICENSE file.
-/// @domName LocalMediaStream; @docsEditable true
-class LocalMediaStream extends MediaStream implements EventTarget native "*LocalMediaStream" {
+/// @domName HTMLMapElement; @docsEditable true
+class MapElement extends Element native "*HTMLMapElement" {
- /// @domName LocalMediaStream.stop; @docsEditable true
- void stop() native;
+ ///@docsEditable true
+ factory MapElement() => document.$dom_createElement("map");
+
+ /// @domName HTMLMapElement.areas; @docsEditable true
+ final HtmlCollection areas;
+
+ /// @domName HTMLMapElement.name; @docsEditable true
+ String name;
}
// 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 Window
-class LocalWindow extends EventTarget implements Window native "@*DOMWindow" {
+/// @domName HTMLMarqueeElement; @docsEditable true
+class MarqueeElement extends Element native "*HTMLMarqueeElement" {
- Document get document => JS('Document', '#.document', this);
+ /// @domName HTMLMarqueeElement.behavior; @docsEditable true
+ String behavior;
- Window _open2(url, name) => JS('Window', '#.open(#,#)', this, url, name);
+ /// @domName HTMLMarqueeElement.bgColor; @docsEditable true
+ String bgColor;
- Window _open3(url, name, options) =>
- JS('Window', '#.open(#,#,#)', this, url, name, options);
+ /// @domName HTMLMarqueeElement.direction; @docsEditable true
+ String direction;
- Window open(String url, String name, [String options]) {
- if (options == null) {
- return _DOMWindowCrossFrame._createSafe(_open2(url, name));
- } else {
- return _DOMWindowCrossFrame._createSafe(_open3(url, name, options));
- }
- }
+ /// @domName HTMLMarqueeElement.height; @docsEditable true
+ String height;
- // API level getter and setter for Location.
- // TODO: The cross domain safe wrapper can be inserted here or folded into
- // _LocationWrapper.
- LocalLocation get location {
- // Firefox work-around for Location. The Firefox location object cannot be
- // made to behave like a Dart object so must be wrapped.
- var result = _location;
- if (_isDartLocation(result)) return result; // e.g. on Chrome.
- if (null == _location_wrapper) {
- _location_wrapper = new _LocationWrapper(result);
- }
- return _location_wrapper;
- }
+ /// @domName HTMLMarqueeElement.hspace; @docsEditable true
+ int hspace;
- // TODO: consider forcing users to do: window.location.assign('string').
- /**
- * Sets the window's location, which causes the browser to navigate to the new
- * location. [value] may be a Location object or a string.
- */
- void set location(value) {
- if (value is _LocationWrapper) {
- _location = value._ptr;
- } else {
- _location = value;
- }
- }
+ /// @domName HTMLMarqueeElement.loop; @docsEditable true
+ int loop;
- _LocationWrapper _location_wrapper; // Cached wrapped Location object.
+ /// @domName HTMLMarqueeElement.scrollAmount; @docsEditable true
+ int scrollAmount;
- // Native getter and setter to access raw Location object.
- dynamic get _location => JS('Location|=Object', '#.location', this);
- void set _location(value) {
- JS('void', '#.location = #', this, value);
- }
- // Prevent compiled from thinking 'location' property is available for a Dart
- // member.
- @JSName('location')
- _protect_location() native;
+ /// @domName HTMLMarqueeElement.scrollDelay; @docsEditable true
+ int scrollDelay;
- static _isDartLocation(thing) {
- // On Firefox the code that implements 'is Location' fails to find the patch
- // stub on Object.prototype and throws an exception.
- try {
- return thing is Location;
- } catch (e) {
- return false;
- }
- }
+ /// @domName HTMLMarqueeElement.trueSpeed; @docsEditable true
+ bool trueSpeed;
- /**
- * Executes a [callback] after the next batch of browser layout measurements
- * has completed or would have completed if any browser layout measurements
- * had been scheduled.
- */
- void requestLayoutFrame(TimeoutHandler callback) {
- _addMeasurementFrameCallback(callback);
- }
+ /// @domName HTMLMarqueeElement.vspace; @docsEditable true
+ int vspace;
- /** @domName DOMWindow.requestAnimationFrame */
- int requestAnimationFrame(RequestAnimationFrameCallback callback) {
- _ensureRequestAnimationFrame();
- return _requestAnimationFrame(callback);
- }
+ /// @domName HTMLMarqueeElement.width; @docsEditable true
+ String width;
- void cancelAnimationFrame(id) {
- _ensureRequestAnimationFrame();
- _cancelAnimationFrame(id);
- }
+ /// @domName HTMLMarqueeElement.start; @docsEditable true
+ void start() native;
- @JSName('requestAnimationFrame')
- int _requestAnimationFrame(RequestAnimationFrameCallback callback) native;
+ /// @domName HTMLMarqueeElement.stop; @docsEditable true
+ void stop() 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.
- @JSName('cancelAnimationFrame')
- void _cancelAnimationFrame(int id) native;
- _ensureRequestAnimationFrame() {
- if (JS('bool',
- '!!(#.requestAnimationFrame && #.cancelAnimationFrame)', this, this))
- return;
+/// @domName MediaController; @docsEditable true
+class MediaController extends EventTarget native "*MediaController" {
- JS('void',
- r"""
- (function($this) {
- var vendors = ['ms', 'moz', 'webkit', 'o'];
- for (var i = 0; i < vendors.length && !$this.requestAnimationFrame; ++i) {
- $this.requestAnimationFrame = $this[vendors[i] + 'RequestAnimationFrame'];
- $this.cancelAnimationFrame =
- $this[vendors[i]+'CancelAnimationFrame'] ||
- $this[vendors[i]+'CancelRequestAnimationFrame'];
- }
- if ($this.requestAnimationFrame && $this.cancelAnimationFrame) return;
- $this.requestAnimationFrame = function(callback) {
- return window.setTimeout(function() {
- callback(Date.now());
- }, 16 /* 16ms ~= 60fps */);
- };
- $this.cancelAnimationFrame = function(id) { clearTimeout(id); }
- })(#)""",
- this);
- }
+ ///@docsEditable true
+ factory MediaController() => _MediaControllerFactoryProvider.createMediaController();
- IdbFactory get indexedDB =>
- JS('IdbFactory',
- '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
- this, this, this);
+ /// @domName MediaController.buffered; @docsEditable true
+ final TimeRanges buffered;
- /**
- * Lookup a port by its [name]. Return null if no port is
- * registered under [name].
- */
- SendPortSync lookupPort(String name) {
- var port = JSON.parse(document.documentElement.attributes['dart-port:$name']);
- return _deserialize(port);
- }
+ /// @domName MediaController.currentTime; @docsEditable true
+ num currentTime;
- /**
- * Register a [port] on this window under the given [name]. This
- * port may be retrieved by any isolate (or JavaScript script)
- * running in this window.
- */
- void registerPort(String name, var port) {
- var serialized = _serialize(port);
- document.documentElement.attributes['dart-port:$name'] = JSON.stringify(serialized);
- }
+ /// @domName MediaController.defaultPlaybackRate; @docsEditable true
+ num defaultPlaybackRate;
- /// @domName Window.console; @docsEditable true
- Console get console => Console.safeConsole;
+ /// @domName MediaController.duration; @docsEditable true
+ final num duration;
+ /// @domName MediaController.muted; @docsEditable true
+ bool muted;
- /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
- LocalWindowEvents get on =>
- new LocalWindowEvents(this);
+ /// @domName MediaController.paused; @docsEditable true
+ final bool paused;
- static const int PERSISTENT = 1;
+ /// @domName MediaController.playbackRate; @docsEditable true
+ num playbackRate;
- static const int TEMPORARY = 0;
+ /// @domName MediaController.played; @docsEditable true
+ final TimeRanges played;
- /// @domName Window.applicationCache; @docsEditable true
- final ApplicationCache applicationCache;
+ /// @domName MediaController.seekable; @docsEditable true
+ final TimeRanges seekable;
- /// @domName Window.closed; @docsEditable true
- final bool closed;
+ /// @domName MediaController.volume; @docsEditable true
+ num volume;
- /// @domName Window.crypto; @docsEditable true
- final Crypto crypto;
+ /// @domName MediaController.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName Window.defaultStatus; @docsEditable true
- String defaultStatus;
+ /// @domName MediaController.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event evt) native;
- /// @domName Window.defaultstatus; @docsEditable true
- String defaultstatus;
+ /// @domName MediaController.pause; @docsEditable true
+ void pause() native;
- /// @domName Window.devicePixelRatio; @docsEditable true
- final num devicePixelRatio;
+ /// @domName MediaController.play; @docsEditable true
+ void play() native;
- /// @domName Window.event; @docsEditable true
- final Event event;
+ /// @domName MediaController.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ 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 Window.history; @docsEditable true
- final LocalHistory history;
- /// @domName Window.innerHeight; @docsEditable true
- final int innerHeight;
+/// @domName HTMLMediaElement; @docsEditable true
+class MediaElement extends Element native "*HTMLMediaElement" {
- /// @domName Window.innerWidth; @docsEditable true
- final int innerWidth;
+ /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
+ MediaElementEvents get on =>
+ new MediaElementEvents(this);
- /// @domName Window.localStorage; @docsEditable true
- final Storage localStorage;
+ static const int HAVE_CURRENT_DATA = 2;
- /// @domName Window.locationbar; @docsEditable true
- final BarInfo locationbar;
+ static const int HAVE_ENOUGH_DATA = 4;
- /// @domName Window.menubar; @docsEditable true
- final BarInfo menubar;
+ static const int HAVE_FUTURE_DATA = 3;
- /// @domName Window.name; @docsEditable true
- String name;
+ static const int HAVE_METADATA = 1;
- /// @domName Window.navigator; @docsEditable true
- final Navigator navigator;
+ static const int HAVE_NOTHING = 0;
- /// @domName Window.offscreenBuffering; @docsEditable true
- final bool offscreenBuffering;
+ static const int NETWORK_EMPTY = 0;
- /// @domName Window.opener; @docsEditable true
- Window get opener => _convertNativeToDart_Window(this._opener);
- @JSName('opener')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
- final dynamic _opener;
+ static const int NETWORK_IDLE = 1;
- /// @domName Window.outerHeight; @docsEditable true
- final int outerHeight;
+ static const int NETWORK_LOADING = 2;
- /// @domName Window.outerWidth; @docsEditable true
- final int outerWidth;
+ static const int NETWORK_NO_SOURCE = 3;
- /// @domName DOMWindow.pagePopupController; @docsEditable true
- final PagePopupController pagePopupController;
+ /// @domName HTMLMediaElement.autoplay; @docsEditable true
+ bool autoplay;
- /// @domName Window.pageXOffset; @docsEditable true
- final int pageXOffset;
+ /// @domName HTMLMediaElement.buffered; @docsEditable true
+ final TimeRanges buffered;
- /// @domName Window.pageYOffset; @docsEditable true
- final int pageYOffset;
+ /// @domName HTMLMediaElement.controller; @docsEditable true
+ MediaController controller;
- /// @domName Window.parent; @docsEditable true
- Window get parent => _convertNativeToDart_Window(this._parent);
- @JSName('parent')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
- final dynamic _parent;
+ /// @domName HTMLMediaElement.controls; @docsEditable true
+ bool controls;
- /// @domName Window.performance; @docsEditable true
- final Performance performance;
+ /// @domName HTMLMediaElement.currentSrc; @docsEditable true
+ final String currentSrc;
- /// @domName Window.personalbar; @docsEditable true
- final BarInfo personalbar;
+ /// @domName HTMLMediaElement.currentTime; @docsEditable true
+ num currentTime;
- /// @domName Window.screen; @docsEditable true
- final Screen screen;
+ /// @domName HTMLMediaElement.defaultMuted; @docsEditable true
+ bool defaultMuted;
- /// @domName Window.screenLeft; @docsEditable true
- final int screenLeft;
+ /// @domName HTMLMediaElement.defaultPlaybackRate; @docsEditable true
+ num defaultPlaybackRate;
- /// @domName Window.screenTop; @docsEditable true
- final int screenTop;
+ /// @domName HTMLMediaElement.duration; @docsEditable true
+ final num duration;
- /// @domName Window.screenX; @docsEditable true
- final int screenX;
+ /// @domName HTMLMediaElement.ended; @docsEditable true
+ final bool ended;
- /// @domName Window.screenY; @docsEditable true
- final int screenY;
+ /// @domName HTMLMediaElement.error; @docsEditable true
+ final MediaError error;
- /// @domName Window.scrollX; @docsEditable true
- final int scrollX;
+ /// @domName HTMLMediaElement.initialTime; @docsEditable true
+ final num initialTime;
- /// @domName Window.scrollY; @docsEditable true
- final int scrollY;
+ /// @domName HTMLMediaElement.loop; @docsEditable true
+ bool loop;
- /// @domName Window.scrollbars; @docsEditable true
- final BarInfo scrollbars;
+ /// @domName HTMLMediaElement.mediaGroup; @docsEditable true
+ String mediaGroup;
- /// @domName Window.self; @docsEditable true
- Window get self => _convertNativeToDart_Window(this._self);
- @JSName('self')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
- final dynamic _self;
+ /// @domName HTMLMediaElement.muted; @docsEditable true
+ bool muted;
- /// @domName Window.sessionStorage; @docsEditable true
- final Storage sessionStorage;
+ /// @domName HTMLMediaElement.networkState; @docsEditable true
+ final int networkState;
- /// @domName Window.status; @docsEditable true
- String status;
+ /// @domName HTMLMediaElement.paused; @docsEditable true
+ final bool paused;
- /// @domName Window.statusbar; @docsEditable true
- final BarInfo statusbar;
+ /// @domName HTMLMediaElement.playbackRate; @docsEditable true
+ num playbackRate;
- /// @domName Window.styleMedia; @docsEditable true
- final StyleMedia styleMedia;
+ /// @domName HTMLMediaElement.played; @docsEditable true
+ final TimeRanges played;
- /// @domName Window.toolbar; @docsEditable true
- final BarInfo toolbar;
+ /// @domName HTMLMediaElement.preload; @docsEditable true
+ String preload;
- /// @domName Window.top; @docsEditable true
- Window get top => _convertNativeToDart_Window(this._top);
- @JSName('top')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
- final dynamic _top;
+ /// @domName HTMLMediaElement.readyState; @docsEditable true
+ final int readyState;
- /// @domName DOMWindow.webkitNotifications; @docsEditable true
- final NotificationCenter webkitNotifications;
+ /// @domName HTMLMediaElement.seekable; @docsEditable true
+ final TimeRanges seekable;
- /// @domName DOMWindow.webkitStorageInfo; @docsEditable true
- final StorageInfo webkitStorageInfo;
+ /// @domName HTMLMediaElement.seeking; @docsEditable true
+ final bool seeking;
- /// @domName Window.window; @docsEditable true
- Window get window => _convertNativeToDart_Window(this._window);
- @JSName('window')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
- final dynamic _window;
+ /// @domName HTMLMediaElement.src; @docsEditable true
+ String src;
- /// @domName Window.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @domName HTMLMediaElement.startTime; @docsEditable true
+ final num startTime;
- /// @domName Window.alert; @docsEditable true
- void alert(String message) native;
+ /// @domName HTMLMediaElement.textTracks; @docsEditable true
+ final TextTrackList textTracks;
- /// @domName Window.atob; @docsEditable true
- String atob(String string) native;
+ /// @domName HTMLMediaElement.volume; @docsEditable true
+ num volume;
- /// @domName Window.btoa; @docsEditable true
- String btoa(String string) native;
+ /// @domName HTMLMediaElement.webkitAudioDecodedByteCount; @docsEditable true
+ final int webkitAudioDecodedByteCount;
- /// @domName Window.captureEvents; @docsEditable true
- void captureEvents() native;
+ /// @domName HTMLMediaElement.webkitClosedCaptionsVisible; @docsEditable true
+ bool webkitClosedCaptionsVisible;
- /// @domName Window.clearInterval; @docsEditable true
- void clearInterval(int handle) native;
+ /// @domName HTMLMediaElement.webkitHasClosedCaptions; @docsEditable true
+ final bool webkitHasClosedCaptions;
- /// @domName Window.clearTimeout; @docsEditable true
- void clearTimeout(int handle) native;
+ /// @domName HTMLMediaElement.webkitPreservesPitch; @docsEditable true
+ bool webkitPreservesPitch;
- /// @domName Window.close; @docsEditable true
- void close() native;
+ /// @domName HTMLMediaElement.webkitVideoDecodedByteCount; @docsEditable true
+ final int webkitVideoDecodedByteCount;
- /// @domName Window.confirm; @docsEditable true
- bool confirm(String message) native;
+ /// @domName HTMLMediaElement.addTextTrack; @docsEditable true
+ TextTrack addTextTrack(String kind, [String label, String language]) native;
- /// @domName Window.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ /// @domName HTMLMediaElement.canPlayType; @docsEditable true
+ String canPlayType(String type, String keySystem) native;
- /// @domName Window.find; @docsEditable true
- bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog) native;
+ /// @domName HTMLMediaElement.load; @docsEditable true
+ void load() native;
- /// @domName Window.getComputedStyle; @docsEditable true
- @JSName('getComputedStyle')
- CssStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElement) native;
+ /// @domName HTMLMediaElement.pause; @docsEditable true
+ void pause() native;
- /// @domName Window.getMatchedCSSRules; @docsEditable true
- @JSName('getMatchedCSSRules')
- @Returns('_CssRuleList') @Creates('_CssRuleList')
- List<CssRule> getMatchedCssRules(Element element, String pseudoElement) native;
+ /// @domName HTMLMediaElement.play; @docsEditable true
+ void play() native;
- /// @domName Window.getSelection; @docsEditable true
- DomSelection getSelection() native;
+ /// @domName HTMLMediaElement.webkitAddKey; @docsEditable true
+ void webkitAddKey(String keySystem, Uint8Array key, [Uint8Array initData, String sessionId]) native;
- /// @domName Window.matchMedia; @docsEditable true
- MediaQueryList matchMedia(String query) native;
+ /// @domName HTMLMediaElement.webkitCancelKeyRequest; @docsEditable true
+ void webkitCancelKeyRequest(String keySystem, String sessionId) native;
- /// @domName Window.moveBy; @docsEditable true
- void moveBy(num x, num y) native;
+ /// @domName HTMLMediaElement.webkitGenerateKeyRequest; @docsEditable true
+ void webkitGenerateKeyRequest(String keySystem, [Uint8Array initData]) native;
+}
- /// @domName Window.moveTo; @docsEditable true
- void moveTo(num x, num y) native;
+/// @docsEditable true
+class MediaElementEvents extends ElementEvents {
+ /// @docsEditable true
+ MediaElementEvents(EventTarget _ptr) : super(_ptr);
- /// @domName DOMWindow.openDatabase; @docsEditable true
- @Creates('Database') @Creates('DatabaseSync')
- Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native;
-
- /// @domName Window.postMessage; @docsEditable true
- void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) {
- if (?message &&
- !?messagePorts) {
- var message_1 = convertDartToNative_SerializedScriptValue(message);
- _postMessage_1(message_1, targetOrigin);
- return;
- }
- if (?message) {
- var message_2 = convertDartToNative_SerializedScriptValue(message);
- _postMessage_2(message_2, targetOrigin, messagePorts);
- return;
- }
- throw new ArgumentError("Incorrect number or type of arguments");
- }
- @JSName('postMessage')
- void _postMessage_1(message, targetOrigin) native;
- @JSName('postMessage')
- void _postMessage_2(message, targetOrigin, List messagePorts) native;
-
- /// @domName Window.print; @docsEditable true
- void print() native;
-
- /// @domName Window.releaseEvents; @docsEditable true
- void releaseEvents() native;
-
- /// @domName Window.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
-
- /// @domName Window.resizeBy; @docsEditable true
- void resizeBy(num x, num y) native;
-
- /// @domName Window.resizeTo; @docsEditable true
- void resizeTo(num width, num height) native;
-
- /// @domName Window.scroll; @docsEditable true
- void scroll(int x, int y) native;
-
- /// @domName Window.scrollBy; @docsEditable true
- void scrollBy(int x, int y) native;
-
- /// @domName Window.scrollTo; @docsEditable true
- void scrollTo(int x, int y) native;
-
- /// @domName Window.setInterval; @docsEditable true
- int setInterval(TimeoutHandler handler, int timeout) native;
-
- /// @domName Window.setTimeout; @docsEditable true
- int setTimeout(TimeoutHandler handler, int timeout) native;
-
- /// @domName Window.showModalDialog; @docsEditable true
- Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) native;
-
- /// @domName Window.stop; @docsEditable true
- void stop() native;
-
- /// @domName Window.webkitConvertPointFromNodeToPage; @docsEditable true
- Point webkitConvertPointFromNodeToPage(Node node, Point p) native;
-
- /// @domName Window.webkitConvertPointFromPageToNode; @docsEditable true
- Point webkitConvertPointFromPageToNode(Node node, Point p) native;
-
- /// @domName DOMWindow.webkitRequestFileSystem; @docsEditable true
- void webkitRequestFileSystem(int type, int size, FileSystemCallback successCallback, [ErrorCallback errorCallback]) native;
-
- /// @domName DOMWindow.webkitResolveLocalFileSystemURL; @docsEditable true
- @JSName('webkitResolveLocalFileSystemURL')
- void webkitResolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native;
-
-}
-
-/// @docsEditable true
-class LocalWindowEvents extends Events {
- /// @docsEditable true
- LocalWindowEvents(EventTarget _ptr) : super(_ptr);
-
- /// @docsEditable true
- EventListenerList get abort => this['abort'];
-
- /// @docsEditable true
- EventListenerList get beforeUnload => this['beforeunload'];
-
- /// @docsEditable true
- EventListenerList get blur => this['blur'];
-
- /// @docsEditable true
- EventListenerList get canPlay => this['canplay'];
+ /// @docsEditable true
+ EventListenerList get canPlay => this['canplay'];
/// @docsEditable true
EventListenerList get canPlayThrough => this['canplaythrough'];
/// @docsEditable true
- EventListenerList get change => this['change'];
-
- /// @docsEditable true
- EventListenerList get click => this['click'];
-
- /// @docsEditable true
- EventListenerList get contextMenu => this['contextmenu'];
-
- /// @docsEditable true
- EventListenerList get doubleClick => this['dblclick'];
-
- /// @docsEditable true
- EventListenerList get deviceMotion => this['devicemotion'];
-
- /// @docsEditable true
- EventListenerList get deviceOrientation => this['deviceorientation'];
-
- /// @docsEditable true
- EventListenerList get drag => this['drag'];
-
- /// @docsEditable true
- EventListenerList get dragEnd => this['dragend'];
-
- /// @docsEditable true
- EventListenerList get dragEnter => this['dragenter'];
-
- /// @docsEditable true
- EventListenerList get dragLeave => this['dragleave'];
-
- /// @docsEditable true
- EventListenerList get dragOver => this['dragover'];
-
- /// @docsEditable true
- EventListenerList get dragStart => this['dragstart'];
-
- /// @docsEditable true
- EventListenerList get drop => this['drop'];
-
- /// @docsEditable true
EventListenerList get durationChange => this['durationchange'];
/// @docsEditable true
@@ -12671,33 +12460,6 @@ class LocalWindowEvents extends Events {
EventListenerList get ended => this['ended'];
/// @docsEditable true
- EventListenerList get error => this['error'];
-
- /// @docsEditable true
- EventListenerList get focus => this['focus'];
-
- /// @docsEditable true
- EventListenerList get hashChange => this['hashchange'];
-
- /// @docsEditable true
- EventListenerList get input => this['input'];
-
- /// @docsEditable true
- EventListenerList get invalid => this['invalid'];
-
- /// @docsEditable true
- EventListenerList get keyDown => this['keydown'];
-
- /// @docsEditable true
- EventListenerList get keyPress => this['keypress'];
-
- /// @docsEditable true
- EventListenerList get keyUp => this['keyup'];
-
- /// @docsEditable true
- EventListenerList get load => this['load'];
-
- /// @docsEditable true
EventListenerList get loadedData => this['loadeddata'];
/// @docsEditable true
@@ -12707,39 +12469,6 @@ class LocalWindowEvents extends Events {
EventListenerList get loadStart => this['loadstart'];
/// @docsEditable true
- EventListenerList get message => this['message'];
-
- /// @docsEditable true
- EventListenerList get mouseDown => this['mousedown'];
-
- /// @docsEditable true
- EventListenerList get mouseMove => this['mousemove'];
-
- /// @docsEditable true
- EventListenerList get mouseOut => this['mouseout'];
-
- /// @docsEditable true
- EventListenerList get mouseOver => this['mouseover'];
-
- /// @docsEditable true
- EventListenerList get mouseUp => this['mouseup'];
-
- /// @docsEditable true
- EventListenerList get mouseWheel => this['mousewheel'];
-
- /// @docsEditable true
- EventListenerList get offline => this['offline'];
-
- /// @docsEditable true
- EventListenerList get online => this['online'];
-
- /// @docsEditable true
- EventListenerList get pageHide => this['pagehide'];
-
- /// @docsEditable true
- EventListenerList get pageShow => this['pageshow'];
-
- /// @docsEditable true
EventListenerList get pause => this['pause'];
/// @docsEditable true
@@ -12749,1614 +12478,1576 @@ class LocalWindowEvents extends Events {
EventListenerList get playing => this['playing'];
/// @docsEditable true
- EventListenerList get popState => this['popstate'];
-
- /// @docsEditable true
EventListenerList get progress => this['progress'];
/// @docsEditable true
EventListenerList get rateChange => this['ratechange'];
/// @docsEditable true
- EventListenerList get reset => this['reset'];
-
- /// @docsEditable true
- EventListenerList get resize => this['resize'];
-
- /// @docsEditable true
- EventListenerList get scroll => this['scroll'];
-
- /// @docsEditable true
- EventListenerList get search => this['search'];
-
- /// @docsEditable true
EventListenerList get seeked => this['seeked'];
/// @docsEditable true
EventListenerList get seeking => this['seeking'];
/// @docsEditable true
- EventListenerList get select => this['select'];
+ EventListenerList get show => this['show'];
/// @docsEditable true
EventListenerList get stalled => this['stalled'];
/// @docsEditable true
- EventListenerList get storage => this['storage'];
-
- /// @docsEditable true
- EventListenerList get submit => this['submit'];
-
- /// @docsEditable true
EventListenerList get suspend => this['suspend'];
/// @docsEditable true
EventListenerList get timeUpdate => this['timeupdate'];
/// @docsEditable true
- EventListenerList get touchCancel => this['touchcancel'];
-
- /// @docsEditable true
- EventListenerList get touchEnd => this['touchend'];
-
- /// @docsEditable true
- EventListenerList get touchMove => this['touchmove'];
-
- /// @docsEditable true
- EventListenerList get touchStart => this['touchstart'];
-
- /// @docsEditable true
- EventListenerList get unload => this['unload'];
-
- /// @docsEditable true
EventListenerList get volumeChange => this['volumechange'];
/// @docsEditable true
EventListenerList get waiting => this['waiting'];
/// @docsEditable true
- EventListenerList get animationEnd => this['webkitAnimationEnd'];
+ EventListenerList get keyAdded => this['webkitkeyadded'];
/// @docsEditable true
- EventListenerList get animationIteration => this['webkitAnimationIteration'];
+ EventListenerList get keyError => this['webkitkeyerror'];
/// @docsEditable true
- EventListenerList get animationStart => this['webkitAnimationStart'];
+ EventListenerList get keyMessage => this['webkitkeymessage'];
/// @docsEditable true
- EventListenerList get transitionEnd => this['webkitTransitionEnd'];
+ EventListenerList get needKey => this['webkitneedkey'];
}
// 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 HTMLMapElement; @docsEditable true
-class MapElement extends Element native "*HTMLMapElement" {
+/// @domName MediaError; @docsEditable true
+class MediaError native "*MediaError" {
- ///@docsEditable true
- factory MapElement() => document.$dom_createElement("map");
+ static const int MEDIA_ERR_ABORTED = 1;
- /// @domName HTMLMapElement.areas; @docsEditable true
- final HtmlCollection areas;
+ static const int MEDIA_ERR_DECODE = 3;
- /// @domName HTMLMapElement.name; @docsEditable true
- String name;
+ static const int MEDIA_ERR_ENCRYPTED = 5;
+
+ static const int MEDIA_ERR_NETWORK = 2;
+
+ static const int MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
+
+ /// @domName MediaError.code; @docsEditable true
+ final int code;
}
// 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 HTMLMarqueeElement; @docsEditable true
-class MarqueeElement extends Element native "*HTMLMarqueeElement" {
+/// @domName MediaKeyError; @docsEditable true
+class MediaKeyError native "*MediaKeyError" {
- /// @domName HTMLMarqueeElement.behavior; @docsEditable true
- String behavior;
+ static const int MEDIA_KEYERR_CLIENT = 2;
- /// @domName HTMLMarqueeElement.bgColor; @docsEditable true
- String bgColor;
+ static const int MEDIA_KEYERR_DOMAIN = 6;
- /// @domName HTMLMarqueeElement.direction; @docsEditable true
- String direction;
+ static const int MEDIA_KEYERR_HARDWARECHANGE = 5;
- /// @domName HTMLMarqueeElement.height; @docsEditable true
- String height;
+ static const int MEDIA_KEYERR_OUTPUT = 4;
- /// @domName HTMLMarqueeElement.hspace; @docsEditable true
- int hspace;
+ static const int MEDIA_KEYERR_SERVICE = 3;
- /// @domName HTMLMarqueeElement.loop; @docsEditable true
- int loop;
+ static const int MEDIA_KEYERR_UNKNOWN = 1;
- /// @domName HTMLMarqueeElement.scrollAmount; @docsEditable true
- int scrollAmount;
+ /// @domName MediaKeyError.code; @docsEditable true
+ final int code;
+}
+// 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 HTMLMarqueeElement.scrollDelay; @docsEditable true
- int scrollDelay;
- /// @domName HTMLMarqueeElement.trueSpeed; @docsEditable true
- bool trueSpeed;
+/// @domName MediaKeyEvent; @docsEditable true
+class MediaKeyEvent extends Event native "*MediaKeyEvent" {
- /// @domName HTMLMarqueeElement.vspace; @docsEditable true
- int vspace;
+ /// @domName MediaKeyEvent.defaultURL; @docsEditable true
+ @JSName('defaultURL')
+ final String defaultUrl;
- /// @domName HTMLMarqueeElement.width; @docsEditable true
- String width;
+ /// @domName MediaKeyEvent.errorCode; @docsEditable true
+ final MediaKeyError errorCode;
- /// @domName HTMLMarqueeElement.start; @docsEditable true
- void start() native;
+ /// @domName MediaKeyEvent.initData; @docsEditable true
+ final Uint8Array initData;
- /// @domName HTMLMarqueeElement.stop; @docsEditable true
- void stop() native;
+ /// @domName MediaKeyEvent.keySystem; @docsEditable true
+ final String keySystem;
+
+ /// @domName MediaKeyEvent.message; @docsEditable true
+ final Uint8Array message;
+
+ /// @domName MediaKeyEvent.sessionId; @docsEditable true
+ final String sessionId;
+
+ /// @domName MediaKeyEvent.systemCode; @docsEditable true
+ final int systemCode;
}
// 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 MediaController; @docsEditable true
-class MediaController extends EventTarget native "*MediaController" {
-
- ///@docsEditable true
- factory MediaController() => _MediaControllerFactoryProvider.createMediaController();
-
- /// @domName MediaController.buffered; @docsEditable true
- final TimeRanges buffered;
+/// @domName MediaList; @docsEditable true
+class MediaList native "*MediaList" {
- /// @domName MediaController.currentTime; @docsEditable true
- num currentTime;
+ /// @domName MediaList.length; @docsEditable true
+ final int length;
- /// @domName MediaController.defaultPlaybackRate; @docsEditable true
- num defaultPlaybackRate;
+ /// @domName MediaList.mediaText; @docsEditable true
+ String mediaText;
- /// @domName MediaController.duration; @docsEditable true
- final num duration;
+ /// @domName MediaList.appendMedium; @docsEditable true
+ void appendMedium(String newMedium) native;
- /// @domName MediaController.muted; @docsEditable true
- bool muted;
+ /// @domName MediaList.deleteMedium; @docsEditable true
+ void deleteMedium(String oldMedium) native;
- /// @domName MediaController.paused; @docsEditable true
- final bool paused;
+ /// @domName MediaList.item; @docsEditable true
+ String item(int 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.
- /// @domName MediaController.playbackRate; @docsEditable true
- num playbackRate;
- /// @domName MediaController.played; @docsEditable true
- final TimeRanges played;
+/// @domName MediaQueryList; @docsEditable true
+class MediaQueryList native "*MediaQueryList" {
- /// @domName MediaController.seekable; @docsEditable true
- final TimeRanges seekable;
+ /// @domName MediaQueryList.matches; @docsEditable true
+ final bool matches;
- /// @domName MediaController.volume; @docsEditable true
- num volume;
+ /// @domName MediaQueryList.media; @docsEditable true
+ final String media;
- /// @domName MediaController.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @domName MediaQueryList.addListener; @docsEditable true
+ void addListener(MediaQueryListListener listener) native;
- /// @domName MediaController.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ /// @domName MediaQueryList.removeListener; @docsEditable true
+ void removeListener(MediaQueryListListener listener) 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 MediaController.pause; @docsEditable true
- void pause() native;
- /// @domName MediaController.play; @docsEditable true
- void play() native;
+/// @domName MediaQueryListListener
+abstract class MediaQueryListListener {
- /// @domName MediaController.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @domName MediaQueryListListener.queryChanged; @docsEditable true
+ void queryChanged(MediaQueryList list);
}
// 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 HTMLMediaElement; @docsEditable true
-class MediaElement extends Element native "*HTMLMediaElement" {
+/// @domName MediaSource; @docsEditable true
+class MediaSource extends EventTarget native "*MediaSource" {
- /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
- MediaElementEvents get on =>
- new MediaElementEvents(this);
+ ///@docsEditable true
+ factory MediaSource() => _MediaSourceFactoryProvider.createMediaSource();
- static const int HAVE_CURRENT_DATA = 2;
+ /// @domName MediaSource.activeSourceBuffers; @docsEditable true
+ final SourceBufferList activeSourceBuffers;
- static const int HAVE_ENOUGH_DATA = 4;
+ /// @domName MediaSource.duration; @docsEditable true
+ num duration;
- static const int HAVE_FUTURE_DATA = 3;
+ /// @domName MediaSource.readyState; @docsEditable true
+ final String readyState;
- static const int HAVE_METADATA = 1;
+ /// @domName MediaSource.sourceBuffers; @docsEditable true
+ final SourceBufferList sourceBuffers;
- static const int HAVE_NOTHING = 0;
+ /// @domName MediaSource.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- static const int NETWORK_EMPTY = 0;
+ /// @domName MediaSource.addSourceBuffer; @docsEditable true
+ SourceBuffer addSourceBuffer(String type) native;
- static const int NETWORK_IDLE = 1;
+ /// @domName MediaSource.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event event) native;
- static const int NETWORK_LOADING = 2;
+ /// @domName MediaSource.endOfStream; @docsEditable true
+ void endOfStream(String error) native;
- static const int NETWORK_NO_SOURCE = 3;
+ /// @domName MediaSource.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName HTMLMediaElement.autoplay; @docsEditable true
- bool autoplay;
+ /// @domName MediaSource.removeSourceBuffer; @docsEditable true
+ void removeSourceBuffer(SourceBuffer buffer) 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 HTMLMediaElement.buffered; @docsEditable true
- final TimeRanges buffered;
- /// @domName HTMLMediaElement.controller; @docsEditable true
- MediaController controller;
+/// @domName MediaStream; @docsEditable true
+class MediaStream extends EventTarget native "*MediaStream" {
- /// @domName HTMLMediaElement.controls; @docsEditable true
- bool controls;
+ ///@docsEditable true
+ factory MediaStream(MediaStreamTrackList audioTracks, MediaStreamTrackList videoTracks) => _MediaStreamFactoryProvider.createMediaStream(audioTracks, videoTracks);
- /// @domName HTMLMediaElement.currentSrc; @docsEditable true
- final String currentSrc;
+ /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
+ MediaStreamEvents get on =>
+ new MediaStreamEvents(this);
- /// @domName HTMLMediaElement.currentTime; @docsEditable true
- num currentTime;
+ static const int ENDED = 2;
- /// @domName HTMLMediaElement.defaultMuted; @docsEditable true
- bool defaultMuted;
+ static const int LIVE = 1;
- /// @domName HTMLMediaElement.defaultPlaybackRate; @docsEditable true
- num defaultPlaybackRate;
+ /// @domName MediaStream.audioTracks; @docsEditable true
+ final MediaStreamTrackList audioTracks;
- /// @domName HTMLMediaElement.duration; @docsEditable true
- final num duration;
+ /// @domName MediaStream.label; @docsEditable true
+ final String label;
- /// @domName HTMLMediaElement.ended; @docsEditable true
- final bool ended;
+ /// @domName MediaStream.readyState; @docsEditable true
+ final int readyState;
- /// @domName HTMLMediaElement.error; @docsEditable true
- final MediaError error;
+ /// @domName MediaStream.videoTracks; @docsEditable true
+ final MediaStreamTrackList videoTracks;
- /// @domName HTMLMediaElement.initialTime; @docsEditable true
- final num initialTime;
+ /// @domName MediaStream.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName HTMLMediaElement.loop; @docsEditable true
- bool loop;
+ /// @domName MediaStream.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event event) native;
- /// @domName HTMLMediaElement.mediaGroup; @docsEditable true
- String mediaGroup;
+ /// @domName MediaStream.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+}
- /// @domName HTMLMediaElement.muted; @docsEditable true
- bool muted;
+/// @docsEditable true
+class MediaStreamEvents extends Events {
+ /// @docsEditable true
+ MediaStreamEvents(EventTarget _ptr) : super(_ptr);
- /// @domName HTMLMediaElement.networkState; @docsEditable true
- final int networkState;
+ /// @docsEditable true
+ EventListenerList get ended => this['ended'];
+}
+// 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 HTMLMediaElement.paused; @docsEditable true
- final bool paused;
- /// @domName HTMLMediaElement.playbackRate; @docsEditable true
- num playbackRate;
+/// @domName MediaStreamEvent; @docsEditable true
+class MediaStreamEvent extends Event native "*MediaStreamEvent" {
- /// @domName HTMLMediaElement.played; @docsEditable true
- final TimeRanges played;
+ /// @domName MediaStreamEvent.stream; @docsEditable true
+ final MediaStream stream;
+}
+// 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 HTMLMediaElement.preload; @docsEditable true
- String preload;
- /// @domName HTMLMediaElement.readyState; @docsEditable true
- final int readyState;
+/// @domName MediaStreamTrack; @docsEditable true
+class MediaStreamTrack extends EventTarget native "*MediaStreamTrack" {
- /// @domName HTMLMediaElement.seekable; @docsEditable true
- final TimeRanges seekable;
-
- /// @domName HTMLMediaElement.seeking; @docsEditable true
- final bool seeking;
-
- /// @domName HTMLMediaElement.src; @docsEditable true
- String src;
-
- /// @domName HTMLMediaElement.startTime; @docsEditable true
- final num startTime;
-
- /// @domName HTMLMediaElement.textTracks; @docsEditable true
- final TextTrackList textTracks;
-
- /// @domName HTMLMediaElement.volume; @docsEditable true
- num volume;
-
- /// @domName HTMLMediaElement.webkitAudioDecodedByteCount; @docsEditable true
- final int webkitAudioDecodedByteCount;
-
- /// @domName HTMLMediaElement.webkitClosedCaptionsVisible; @docsEditable true
- bool webkitClosedCaptionsVisible;
-
- /// @domName HTMLMediaElement.webkitHasClosedCaptions; @docsEditable true
- final bool webkitHasClosedCaptions;
+ /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
+ MediaStreamTrackEvents get on =>
+ new MediaStreamTrackEvents(this);
- /// @domName HTMLMediaElement.webkitPreservesPitch; @docsEditable true
- bool webkitPreservesPitch;
+ static const int ENDED = 2;
- /// @domName HTMLMediaElement.webkitVideoDecodedByteCount; @docsEditable true
- final int webkitVideoDecodedByteCount;
+ static const int LIVE = 0;
- /// @domName HTMLMediaElement.addTextTrack; @docsEditable true
- TextTrack addTextTrack(String kind, [String label, String language]) native;
+ static const int MUTED = 1;
- /// @domName HTMLMediaElement.canPlayType; @docsEditable true
- String canPlayType(String type, String keySystem) native;
+ /// @domName MediaStreamTrack.enabled; @docsEditable true
+ bool enabled;
- /// @domName HTMLMediaElement.load; @docsEditable true
- void load() native;
+ /// @domName MediaStreamTrack.kind; @docsEditable true
+ final String kind;
- /// @domName HTMLMediaElement.pause; @docsEditable true
- void pause() native;
+ /// @domName MediaStreamTrack.label; @docsEditable true
+ final String label;
- /// @domName HTMLMediaElement.play; @docsEditable true
- void play() native;
+ /// @domName MediaStreamTrack.readyState; @docsEditable true
+ final int readyState;
- /// @domName HTMLMediaElement.webkitAddKey; @docsEditable true
- void webkitAddKey(String keySystem, Uint8Array key, [Uint8Array initData, String sessionId]) native;
+ /// @domName MediaStreamTrack.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName HTMLMediaElement.webkitCancelKeyRequest; @docsEditable true
- void webkitCancelKeyRequest(String keySystem, String sessionId) native;
+ /// @domName MediaStreamTrack.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event event) native;
- /// @domName HTMLMediaElement.webkitGenerateKeyRequest; @docsEditable true
- void webkitGenerateKeyRequest(String keySystem, [Uint8Array initData]) native;
+ /// @domName MediaStreamTrack.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
}
/// @docsEditable true
-class MediaElementEvents extends ElementEvents {
- /// @docsEditable true
- MediaElementEvents(EventTarget _ptr) : super(_ptr);
-
- /// @docsEditable true
- EventListenerList get canPlay => this['canplay'];
-
- /// @docsEditable true
- EventListenerList get canPlayThrough => this['canplaythrough'];
-
- /// @docsEditable true
- EventListenerList get durationChange => this['durationchange'];
-
+class MediaStreamTrackEvents extends Events {
/// @docsEditable true
- EventListenerList get emptied => this['emptied'];
+ MediaStreamTrackEvents(EventTarget _ptr) : super(_ptr);
/// @docsEditable true
EventListenerList get ended => this['ended'];
/// @docsEditable true
- EventListenerList get loadedData => this['loadeddata'];
-
- /// @docsEditable true
- EventListenerList get loadedMetadata => this['loadedmetadata'];
-
- /// @docsEditable true
- EventListenerList get loadStart => this['loadstart'];
+ EventListenerList get mute => this['mute'];
/// @docsEditable true
- EventListenerList get pause => this['pause'];
+ EventListenerList get unmute => this['unmute'];
+}
+// 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 true
- EventListenerList get play => this['play'];
- /// @docsEditable true
- EventListenerList get playing => this['playing'];
+/// @domName MediaStreamTrackEvent; @docsEditable true
+class MediaStreamTrackEvent extends Event native "*MediaStreamTrackEvent" {
- /// @docsEditable true
- EventListenerList get progress => this['progress'];
+ /// @domName MediaStreamTrackEvent.track; @docsEditable true
+ final MediaStreamTrack track;
+}
+// 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 true
- EventListenerList get rateChange => this['ratechange'];
- /// @docsEditable true
- EventListenerList get seeked => this['seeked'];
+/// @domName MediaStreamTrackList; @docsEditable true
+class MediaStreamTrackList extends EventTarget native "*MediaStreamTrackList" {
- /// @docsEditable true
- EventListenerList get seeking => this['seeking'];
+ /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
+ MediaStreamTrackListEvents get on =>
+ new MediaStreamTrackListEvents(this);
- /// @docsEditable true
- EventListenerList get show => this['show'];
+ /// @domName MediaStreamTrackList.length; @docsEditable true
+ final int length;
- /// @docsEditable true
- EventListenerList get stalled => this['stalled'];
+ /// @domName MediaStreamTrackList.add; @docsEditable true
+ void add(MediaStreamTrack track) native;
- /// @docsEditable true
- EventListenerList get suspend => this['suspend'];
+ /// @domName MediaStreamTrackList.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @docsEditable true
- EventListenerList get timeUpdate => this['timeupdate'];
+ /// @domName MediaStreamTrackList.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event event) native;
- /// @docsEditable true
- EventListenerList get volumeChange => this['volumechange'];
+ /// @domName MediaStreamTrackList.item; @docsEditable true
+ MediaStreamTrack item(int index) native;
- /// @docsEditable true
- EventListenerList get waiting => this['waiting'];
+ /// @domName MediaStreamTrackList.remove; @docsEditable true
+ void remove(MediaStreamTrack track) native;
- /// @docsEditable true
- EventListenerList get keyAdded => this['webkitkeyadded'];
+ /// @domName MediaStreamTrackList.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+}
+/// @docsEditable true
+class MediaStreamTrackListEvents extends Events {
/// @docsEditable true
- EventListenerList get keyError => this['webkitkeyerror'];
+ MediaStreamTrackListEvents(EventTarget _ptr) : super(_ptr);
/// @docsEditable true
- EventListenerList get keyMessage => this['webkitkeymessage'];
+ EventListenerList get addTrack => this['addtrack'];
/// @docsEditable true
- EventListenerList get needKey => this['webkitneedkey'];
+ EventListenerList get removeTrack => this['removetrack'];
}
// 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 MediaError; @docsEditable true
-class MediaError native "*MediaError" {
-
- static const int MEDIA_ERR_ABORTED = 1;
-
- static const int MEDIA_ERR_DECODE = 3;
-
- static const int MEDIA_ERR_ENCRYPTED = 5;
+/// @domName MemoryInfo; @docsEditable true
+class MemoryInfo native "*MemoryInfo" {
- static const int MEDIA_ERR_NETWORK = 2;
+ /// @domName MemoryInfo.jsHeapSizeLimit; @docsEditable true
+ final int jsHeapSizeLimit;
- static const int MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
+ /// @domName MemoryInfo.totalJSHeapSize; @docsEditable true
+ final int totalJSHeapSize;
- /// @domName MediaError.code; @docsEditable true
- final int code;
+ /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true
+ final int usedJSHeapSize;
}
// 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 MediaKeyError; @docsEditable true
-class MediaKeyError native "*MediaKeyError" {
-
- static const int MEDIA_KEYERR_CLIENT = 2;
+/**
+ * An HTML <menu> element.
+ *
+ * A <menu> element represents an unordered list of menu commands.
+ *
+ * See also:
+ *
+ * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu) from MDN.
+ * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-element) from the W3C.
+ */
+/// @domName HTMLMenuElement; @docsEditable true
+class MenuElement extends Element native "*HTMLMenuElement" {
- static const int MEDIA_KEYERR_DOMAIN = 6;
+ ///@docsEditable true
+ factory MenuElement() => document.$dom_createElement("menu");
+}
+// 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.
- static const int MEDIA_KEYERR_HARDWARECHANGE = 5;
- static const int MEDIA_KEYERR_OUTPUT = 4;
+/// @domName MessageChannel; @docsEditable true
+class MessageChannel native "*MessageChannel" {
- static const int MEDIA_KEYERR_SERVICE = 3;
+ ///@docsEditable true
+ factory MessageChannel() => _MessageChannelFactoryProvider.createMessageChannel();
- static const int MEDIA_KEYERR_UNKNOWN = 1;
+ /// @domName MessageChannel.port1; @docsEditable true
+ final MessagePort port1;
- /// @domName MediaKeyError.code; @docsEditable true
- final int code;
+ /// @domName MessageChannel.port2; @docsEditable true
+ final MessagePort port2;
}
// 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 MediaKeyEvent; @docsEditable true
-class MediaKeyEvent extends Event native "*MediaKeyEvent" {
+/// @domName MessageEvent; @docsEditable true
+class MessageEvent extends Event native "*MessageEvent" {
- /// @domName MediaKeyEvent.defaultURL; @docsEditable true
- @JSName('defaultURL')
- final String defaultUrl;
+ /// @domName MessageEvent.data; @docsEditable true
+ dynamic get data => convertNativeToDart_SerializedScriptValue(this._data);
+ @JSName('data')
+ @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
+ final dynamic _data;
- /// @domName MediaKeyEvent.errorCode; @docsEditable true
- final MediaKeyError errorCode;
+ /// @domName MessageEvent.lastEventId; @docsEditable true
+ final String lastEventId;
- /// @domName MediaKeyEvent.initData; @docsEditable true
- final Uint8Array initData;
+ /// @domName MessageEvent.origin; @docsEditable true
+ final String origin;
- /// @domName MediaKeyEvent.keySystem; @docsEditable true
- final String keySystem;
+ /// @domName MessageEvent.ports; @docsEditable true
+ @Creates('=List')
+ final List ports;
- /// @domName MediaKeyEvent.message; @docsEditable true
- final Uint8Array message;
+ /// @domName MessageEvent.source; @docsEditable true
+ WindowBase get source => _convertNativeToDart_Window(this._source);
+ @JSName('source')
+ @Creates('Window|=Object') @Returns('Window|=Object')
+ final dynamic _source;
- /// @domName MediaKeyEvent.sessionId; @docsEditable true
- final String sessionId;
+ /// @domName MessageEvent.initMessageEvent; @docsEditable true
+ void initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List messagePorts) native;
- /// @domName MediaKeyEvent.systemCode; @docsEditable true
- final int systemCode;
+ /// @domName MessageEvent.webkitInitMessageEvent; @docsEditable true
+ void webkitInitMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List transferables) 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 MediaList; @docsEditable true
-class MediaList native "*MediaList" {
+/// @domName MessagePort; @docsEditable true
+class MessagePort extends EventTarget native "*MessagePort" {
- /// @domName MediaList.length; @docsEditable true
- final int length;
+ /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
+ MessagePortEvents get on =>
+ new MessagePortEvents(this);
- /// @domName MediaList.mediaText; @docsEditable true
- String mediaText;
+ /// @domName MessagePort.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName MediaList.appendMedium; @docsEditable true
- void appendMedium(String newMedium) native;
+ /// @domName MessagePort.close; @docsEditable true
+ void close() native;
- /// @domName MediaList.deleteMedium; @docsEditable true
- void deleteMedium(String oldMedium) native;
+ /// @domName MessagePort.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event evt) native;
- /// @domName MediaList.item; @docsEditable true
- String item(int index) native;
+ /// @domName MessagePort.postMessage; @docsEditable true
+ void postMessage(/*any*/ message, [List messagePorts]) {
+ if (?messagePorts) {
+ var message_1 = convertDartToNative_SerializedScriptValue(message);
+ _postMessage_1(message_1, messagePorts);
+ return;
+ }
+ var message_2 = convertDartToNative_SerializedScriptValue(message);
+ _postMessage_2(message_2);
+ return;
+ }
+ @JSName('postMessage')
+ void _postMessage_1(message, List messagePorts) native;
+ @JSName('postMessage')
+ void _postMessage_2(message) native;
+
+ /// @domName MessagePort.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+
+ /// @domName MessagePort.start; @docsEditable true
+ void start() native;
+}
+
+/// @docsEditable true
+class MessagePortEvents extends Events {
+ /// @docsEditable true
+ MessagePortEvents(EventTarget _ptr) : super(_ptr);
+
+ /// @docsEditable true
+ EventListenerList get message => this['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.
-/// @domName MediaQueryList; @docsEditable true
-class MediaQueryList native "*MediaQueryList" {
+/// @domName HTMLMetaElement; @docsEditable true
+class MetaElement extends Element native "*HTMLMetaElement" {
- /// @domName MediaQueryList.matches; @docsEditable true
- final bool matches;
+ /// @domName HTMLMetaElement.content; @docsEditable true
+ String content;
- /// @domName MediaQueryList.media; @docsEditable true
- final String media;
+ /// @domName HTMLMetaElement.httpEquiv; @docsEditable true
+ String httpEquiv;
- /// @domName MediaQueryList.addListener; @docsEditable true
- void addListener(MediaQueryListListener listener) native;
+ /// @domName HTMLMetaElement.name; @docsEditable true
+ String name;
- /// @domName MediaQueryList.removeListener; @docsEditable true
- void removeListener(MediaQueryListListener listener) native;
+ /// @domName HTMLMetaElement.scheme; @docsEditable true
+ String scheme;
}
// 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 MediaQueryListListener
-abstract class MediaQueryListListener {
+/// @domName Metadata; @docsEditable true
+class Metadata native "*Metadata" {
- /// @domName MediaQueryListListener.queryChanged; @docsEditable true
- void queryChanged(MediaQueryList list);
+ /// @domName Metadata.modificationTime; @docsEditable true
+ final Date modificationTime;
+
+ /// @domName Metadata.size; @docsEditable true
+ final int size;
}
// 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.
-/// @domName MediaSource; @docsEditable true
-class MediaSource extends EventTarget native "*MediaSource" {
-
- ///@docsEditable true
- factory MediaSource() => _MediaSourceFactoryProvider.createMediaSource();
-
- /// @domName MediaSource.activeSourceBuffers; @docsEditable true
- final SourceBufferList activeSourceBuffers;
-
- /// @domName MediaSource.duration; @docsEditable true
- num duration;
-
- /// @domName MediaSource.readyState; @docsEditable true
- final String readyState;
-
- /// @domName MediaSource.sourceBuffers; @docsEditable true
- final SourceBufferList sourceBuffers;
-
- /// @domName MediaSource.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
-
- /// @domName MediaSource.addSourceBuffer; @docsEditable true
- SourceBuffer addSourceBuffer(String type) native;
-
- /// @domName MediaSource.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
-
- /// @domName MediaSource.endOfStream; @docsEditable true
- void endOfStream(String error) native;
-
- /// @domName MediaSource.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName MediaSource.removeSourceBuffer; @docsEditable true
- void removeSourceBuffer(SourceBuffer buffer) native;
-}
+typedef void MetadataCallback(Metadata metadata);
// 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 MediaStream; @docsEditable true
-class MediaStream extends EventTarget native "*MediaStream" {
+/// @domName HTMLMeterElement; @docsEditable true
+class MeterElement extends Element native "*HTMLMeterElement" {
///@docsEditable true
- factory MediaStream(MediaStreamTrackList audioTracks, MediaStreamTrackList videoTracks) => _MediaStreamFactoryProvider.createMediaStream(audioTracks, videoTracks);
-
- /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
- MediaStreamEvents get on =>
- new MediaStreamEvents(this);
-
- static const int ENDED = 2;
-
- static const int LIVE = 1;
-
- /// @domName MediaStream.audioTracks; @docsEditable true
- final MediaStreamTrackList audioTracks;
-
- /// @domName MediaStream.label; @docsEditable true
- final String label;
+ factory MeterElement() => document.$dom_createElement("meter");
- /// @domName MediaStream.readyState; @docsEditable true
- final int readyState;
+ /// @domName HTMLMeterElement.high; @docsEditable true
+ num high;
- /// @domName MediaStream.videoTracks; @docsEditable true
- final MediaStreamTrackList videoTracks;
+ /// @domName HTMLMeterElement.labels; @docsEditable true
+ @Returns('NodeList') @Creates('NodeList')
+ final List<Node> labels;
- /// @domName MediaStream.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @domName HTMLMeterElement.low; @docsEditable true
+ num low;
- /// @domName MediaStream.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ /// @domName HTMLMeterElement.max; @docsEditable true
+ num max;
- /// @domName MediaStream.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
-}
+ /// @domName HTMLMeterElement.min; @docsEditable true
+ num min;
-/// @docsEditable true
-class MediaStreamEvents extends Events {
- /// @docsEditable true
- MediaStreamEvents(EventTarget _ptr) : super(_ptr);
+ /// @domName HTMLMeterElement.optimum; @docsEditable true
+ num optimum;
- /// @docsEditable true
- EventListenerList get ended => this['ended'];
+ /// @domName HTMLMeterElement.value; @docsEditable true
+ num value;
}
// 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 MediaStreamEvent; @docsEditable true
-class MediaStreamEvent extends Event native "*MediaStreamEvent" {
+/// @domName HTMLModElement; @docsEditable true
+class ModElement extends Element native "*HTMLModElement" {
- /// @domName MediaStreamEvent.stream; @docsEditable true
- final MediaStream stream;
+ /// @domName HTMLModElement.cite; @docsEditable true
+ String cite;
+
+ /// @domName HTMLModElement.dateTime; @docsEditable true
+ String dateTime;
}
// 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 MediaStreamTrack; @docsEditable true
-class MediaStreamTrack extends EventTarget native "*MediaStreamTrack" {
+/// @domName MouseEvent
+class MouseEvent extends UIEvent native "*MouseEvent" {
+ factory MouseEvent(String type, Window view, int detail, int screenX,
+ int screenY, int clientX, int clientY, int button, [bool canBubble = true,
+ bool cancelable = true, bool ctrlKey = false, bool altKey = false,
+ bool shiftKey = false, bool metaKey = false,
+ EventTarget relatedTarget = null]) =>
+ _MouseEventFactoryProvider.createMouseEvent(
+ type, view, detail, screenX, screenY,
+ clientX, clientY, button, canBubble, cancelable,
+ ctrlKey, altKey, shiftKey, metaKey,
+ relatedTarget);
- /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
- MediaStreamTrackEvents get on =>
- new MediaStreamTrackEvents(this);
+ /// @domName MouseEvent.altKey; @docsEditable true
+ final bool altKey;
- static const int ENDED = 2;
+ /// @domName MouseEvent.button; @docsEditable true
+ final int button;
- static const int LIVE = 0;
+ /// @domName MouseEvent.clientX; @docsEditable true
+ final int clientX;
- static const int MUTED = 1;
+ /// @domName MouseEvent.clientY; @docsEditable true
+ final int clientY;
- /// @domName MediaStreamTrack.enabled; @docsEditable true
- bool enabled;
+ /// @domName MouseEvent.ctrlKey; @docsEditable true
+ final bool ctrlKey;
- /// @domName MediaStreamTrack.kind; @docsEditable true
- final String kind;
+ /// @domName MouseEvent.dataTransfer; @docsEditable true
+ final Clipboard dataTransfer;
- /// @domName MediaStreamTrack.label; @docsEditable true
- final String label;
+ /// @domName MouseEvent.fromElement; @docsEditable true
+ final Node fromElement;
- /// @domName MediaStreamTrack.readyState; @docsEditable true
- final int readyState;
+ /// @domName MouseEvent.metaKey; @docsEditable true
+ final bool metaKey;
- /// @domName MediaStreamTrack.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @domName MouseEvent.relatedTarget; @docsEditable true
+ EventTarget get relatedTarget => _convertNativeToDart_EventTarget(this._relatedTarget);
+ @JSName('relatedTarget')
+ @Creates('Node') @Returns('EventTarget|=Object')
+ final dynamic _relatedTarget;
- /// @domName MediaStreamTrack.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ /// @domName MouseEvent.screenX; @docsEditable true
+ final int screenX;
- /// @domName MediaStreamTrack.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
-}
+ /// @domName MouseEvent.screenY; @docsEditable true
+ final int screenY;
-/// @docsEditable true
-class MediaStreamTrackEvents extends Events {
- /// @docsEditable true
- MediaStreamTrackEvents(EventTarget _ptr) : super(_ptr);
+ /// @domName MouseEvent.shiftKey; @docsEditable true
+ final bool shiftKey;
- /// @docsEditable true
- EventListenerList get ended => this['ended'];
+ /// @domName MouseEvent.toElement; @docsEditable true
+ final Node toElement;
- /// @docsEditable true
- EventListenerList get mute => this['mute'];
+ /// @domName MouseEvent.webkitMovementX; @docsEditable true
+ final int webkitMovementX;
- /// @docsEditable true
- EventListenerList get unmute => this['unmute'];
+ /// @domName MouseEvent.webkitMovementY; @docsEditable true
+ final int webkitMovementY;
+
+ /// @domName MouseEvent.x; @docsEditable true
+ final int x;
+
+ /// @domName MouseEvent.y; @docsEditable true
+ final int y;
+
+ /// @domName MouseEvent.initMouseEvent; @docsEditable true
+ void $dom_initMouseEvent(String type, bool canBubble, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) {
+ var relatedTarget_1 = _convertDartToNative_EventTarget(relatedTarget);
+ _$dom_initMouseEvent_1(type, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget_1);
+ return;
+ }
+ @JSName('initMouseEvent')
+ void _$dom_initMouseEvent_1(type, canBubble, cancelable, Window view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) native;
+
+
+ int get offsetX {
+ if (JS('bool', '!!#.offsetX', this)) {
+ return JS('int', '#.offsetX', this);
+ } else {
+ // Firefox does not support offsetX.
+ var target = this.target;
+ if (!(target is Element)) {
+ throw new UnsupportedError(
+ 'offsetX is only supported on elements');
+ }
+ return this.clientX - this.target.getBoundingClientRect().left;
+ }
+ }
+
+ int get offsetY {
+ if (JS('bool', '!!#.offsetY', this)) {
+ return JS('int', '#.offsetY', this);
+ } else {
+ // Firefox does not support offsetY.
+ var target = this.target;
+ if (!(target is Element)) {
+ throw new UnsupportedError(
+ 'offsetY is only supported on elements');
+ }
+ return this.clientY - this.target.getBoundingClientRect().top;
+ }
+ }
}
// 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.
-/// @domName MediaStreamTrackEvent; @docsEditable true
-class MediaStreamTrackEvent extends Event native "*MediaStreamTrackEvent" {
- /// @domName MediaStreamTrackEvent.track; @docsEditable true
- final MediaStreamTrack track;
-}
+typedef void MutationCallback(List<MutationRecord> mutations, MutationObserver observer);
// 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 MediaStreamTrackList; @docsEditable true
-class MediaStreamTrackList extends EventTarget native "*MediaStreamTrackList" {
-
- /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
- MediaStreamTrackListEvents get on =>
- new MediaStreamTrackListEvents(this);
-
- /// @domName MediaStreamTrackList.length; @docsEditable true
- final int length;
+/// @domName MutationEvent; @docsEditable true
+class MutationEvent extends Event native "*MutationEvent" {
- /// @domName MediaStreamTrackList.add; @docsEditable true
- void add(MediaStreamTrack track) native;
+ static const int ADDITION = 2;
- /// @domName MediaStreamTrackList.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ static const int MODIFICATION = 1;
- /// @domName MediaStreamTrackList.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ static const int REMOVAL = 3;
- /// @domName MediaStreamTrackList.item; @docsEditable true
- MediaStreamTrack item(int index) native;
+ /// @domName MutationEvent.attrChange; @docsEditable true
+ final int attrChange;
- /// @domName MediaStreamTrackList.remove; @docsEditable true
- void remove(MediaStreamTrack track) native;
+ /// @domName MutationEvent.attrName; @docsEditable true
+ final String attrName;
- /// @domName MediaStreamTrackList.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
-}
+ /// @domName MutationEvent.newValue; @docsEditable true
+ final String newValue;
-/// @docsEditable true
-class MediaStreamTrackListEvents extends Events {
- /// @docsEditable true
- MediaStreamTrackListEvents(EventTarget _ptr) : super(_ptr);
+ /// @domName MutationEvent.prevValue; @docsEditable true
+ final String prevValue;
- /// @docsEditable true
- EventListenerList get addTrack => this['addtrack'];
+ /// @domName MutationEvent.relatedNode; @docsEditable true
+ final Node relatedNode;
- /// @docsEditable true
- EventListenerList get removeTrack => this['removetrack'];
+ /// @domName MutationEvent.initMutationEvent; @docsEditable true
+ void initMutationEvent(String type, bool canBubble, bool cancelable, Node relatedNode, String prevValue, String newValue, String attrName, int attrChange) 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 MemoryInfo; @docsEditable true
-class MemoryInfo native "*MemoryInfo" {
+/// @domName MutationObserver
+class MutationObserver native "*MutationObserver" {
- /// @domName MemoryInfo.jsHeapSizeLimit; @docsEditable true
- final int jsHeapSizeLimit;
+ ///@docsEditable true
+ factory MutationObserver(MutationCallback callback) => _MutationObserverFactoryProvider.createMutationObserver(callback);
- /// @domName MemoryInfo.totalJSHeapSize; @docsEditable true
- final int totalJSHeapSize;
+ /// @domName MutationObserver.disconnect; @docsEditable true
+ void disconnect() native;
- /// @domName MemoryInfo.usedJSHeapSize; @docsEditable true
- final int usedJSHeapSize;
-}
-// 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 MutationObserver._observe; @docsEditable true
+ void _observe(Node target, Map options) {
+ var options_1 = convertDartToNative_Dictionary(options);
+ __observe_1(target, options_1);
+ return;
+ }
+ @JSName('observe')
+ void __observe_1(Node target, options) native;
+ /// @domName MutationObserver.takeRecords; @docsEditable true
+ List<MutationRecord> takeRecords() native;
-/**
- * An HTML <menu> element.
- *
- * A <menu> element represents an unordered list of menu commands.
- *
- * See also:
- *
- * * [Menu Element](https://developer.mozilla.org/en-US/docs/HTML/Element/menu) from MDN.
- * * [Menu Element](http://www.w3.org/TR/html5/the-menu-element.html#the-menu-element) from the W3C.
- */
-/// @domName HTMLMenuElement; @docsEditable true
-class MenuElement extends Element native "*HTMLMenuElement" {
+ void observe(Node target,
+ {Map options,
+ bool childList,
+ bool attributes,
+ bool characterData,
+ bool subtree,
+ bool attributeOldValue,
+ bool characterDataOldValue,
+ List<String> attributeFilter}) {
- ///@docsEditable true
- factory MenuElement() => document.$dom_createElement("menu");
-}
-// 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.
+ // Parse options into map of known type.
+ var parsedOptions = _createDict();
+ if (options != null) {
+ options.forEach((k, v) {
+ if (_boolKeys.containsKey(k)) {
+ _add(parsedOptions, k, true == v);
+ } else if (k == 'attributeFilter') {
+ _add(parsedOptions, k, _fixupList(v));
+ } else {
+ throw new ArgumentError(
+ "Illegal MutationObserver.observe option '$k'");
+ }
+ });
+ }
-/// @domName MessageChannel; @docsEditable true
-class MessageChannel native "*MessageChannel" {
+ // Override options passed in the map with named optional arguments.
+ override(key, value) {
+ if (value != null) _add(parsedOptions, key, value);
+ }
- ///@docsEditable true
- factory MessageChannel() => _MessageChannelFactoryProvider.createMessageChannel();
+ override('childList', childList);
+ override('attributes', attributes);
+ override('characterData', characterData);
+ override('subtree', subtree);
+ override('attributeOldValue', attributeOldValue);
+ override('characterDataOldValue', characterDataOldValue);
+ if (attributeFilter != null) {
+ override('attributeFilter', _fixupList(attributeFilter));
+ }
- /// @domName MessageChannel.port1; @docsEditable true
- final MessagePort port1;
+ _call(target, parsedOptions);
+ }
- /// @domName MessageChannel.port2; @docsEditable true
- final MessagePort port2;
+ // TODO: Change to a set when const Sets are available.
+ static final _boolKeys =
+ const {'childList': true,
+ 'attributes': true,
+ 'characterData': true,
+ 'subtree': true,
+ 'attributeOldValue': true,
+ 'characterDataOldValue': true };
+
+
+ static _createDict() => JS('var', '{}');
+ static _add(m, String key, value) { JS('void', '#[#] = #', m, key, value); }
+ static _fixupList(list) => list; // TODO: Ensure is a JavaScript Array.
+
+ // Call native function with no conversions.
+ @JSName('observe')
+ void _call(target, options) 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 MessageEvent; @docsEditable true
-class MessageEvent extends Event native "*MessageEvent" {
+/// @domName MutationRecord; @docsEditable true
+class MutationRecord native "*MutationRecord" {
- /// @domName MessageEvent.data; @docsEditable true
- dynamic get data => convertNativeToDart_SerializedScriptValue(this._data);
- @JSName('data')
- @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
- final dynamic _data;
+ /// @domName MutationRecord.addedNodes; @docsEditable true
+ @Returns('NodeList') @Creates('NodeList')
+ final List<Node> addedNodes;
- /// @domName MessageEvent.lastEventId; @docsEditable true
- final String lastEventId;
+ /// @domName MutationRecord.attributeName; @docsEditable true
+ final String attributeName;
- /// @domName MessageEvent.origin; @docsEditable true
- final String origin;
+ /// @domName MutationRecord.attributeNamespace; @docsEditable true
+ final String attributeNamespace;
- /// @domName MessageEvent.ports; @docsEditable true
- @Creates('=List')
- final List ports;
+ /// @domName MutationRecord.nextSibling; @docsEditable true
+ final Node nextSibling;
- /// @domName MessageEvent.source; @docsEditable true
- Window get source => _convertNativeToDart_Window(this._source);
- @JSName('source')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
- final dynamic _source;
+ /// @domName MutationRecord.oldValue; @docsEditable true
+ final String oldValue;
- /// @domName MessageEvent.initMessageEvent; @docsEditable true
- void initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, LocalWindow sourceArg, List messagePorts) native;
+ /// @domName MutationRecord.previousSibling; @docsEditable true
+ final Node previousSibling;
- /// @domName MessageEvent.webkitInitMessageEvent; @docsEditable true
- void webkitInitMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, LocalWindow sourceArg, List transferables) native;
+ /// @domName MutationRecord.removedNodes; @docsEditable true
+ @Returns('NodeList') @Creates('NodeList')
+ final List<Node> removedNodes;
+
+ /// @domName MutationRecord.target; @docsEditable true
+ final Node target;
+
+ /// @domName MutationRecord.type; @docsEditable true
+ final String type;
}
// 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 MessagePort; @docsEditable true
-class MessagePort extends EventTarget native "*MessagePort" {
+/// @domName NamedNodeMap; @docsEditable true
+class NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*NamedNodeMap" {
- /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
- MessagePortEvents get on =>
- new MessagePortEvents(this);
+ /// @domName NamedNodeMap.length; @docsEditable true
+ int get length => JS("int", "#.length", this);
- /// @domName MessagePort.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ Node operator[](int index) => JS("Node", "#[#]", this, index);
- /// @domName MessagePort.close; @docsEditable true
- void close() native;
+ void operator[]=(int index, Node value) {
+ throw new UnsupportedError("Cannot assign element of immutable List.");
+ }
+ // -- start List<Node> mixins.
+ // Node is the element type.
- /// @domName MessagePort.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ // From Iterable<Node>:
- /// @domName MessagePort.postMessage; @docsEditable true
- void postMessage(/*any*/ message, [List messagePorts]) {
- if (?messagePorts) {
- var message_1 = convertDartToNative_SerializedScriptValue(message);
- _postMessage_1(message_1, messagePorts);
- return;
- }
- var message_2 = convertDartToNative_SerializedScriptValue(message);
- _postMessage_2(message_2);
- return;
+ Iterator<Node> 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<Node>(this);
}
- @JSName('postMessage')
- void _postMessage_1(message, List messagePorts) native;
- @JSName('postMessage')
- void _postMessage_2(message) native;
- /// @domName MessagePort.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ // From Collection<Node>:
- /// @domName MessagePort.start; @docsEditable true
- void start() native;
-}
+ void add(Node value) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
-/// @docsEditable true
-class MessagePortEvents extends Events {
- /// @docsEditable true
- MessagePortEvents(EventTarget _ptr) : super(_ptr);
+ void addLast(Node value) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
- /// @docsEditable true
- EventListenerList get message => this['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.
+ void addAll(Collection<Node> collection) {
+ throw new UnsupportedError("Cannot add to immutable List.");
+ }
+ dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
+ return Collections.reduce(this, initialValue, combine);
+ }
-/// @domName HTMLMetaElement; @docsEditable true
-class MetaElement extends Element native "*HTMLMetaElement" {
+ bool contains(Node element) => Collections.contains(this, element);
- /// @domName HTMLMetaElement.content; @docsEditable true
- String content;
+ void forEach(void f(Node element)) => Collections.forEach(this, f);
- /// @domName HTMLMetaElement.httpEquiv; @docsEditable true
- String httpEquiv;
+ Collection map(f(Node element)) => Collections.map(this, [], f);
- /// @domName HTMLMetaElement.name; @docsEditable true
- String name;
+ Collection<Node> filter(bool f(Node element)) =>
+ Collections.filter(this, <Node>[], f);
- /// @domName HTMLMetaElement.scheme; @docsEditable true
- String scheme;
-}
-// 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.
+ bool every(bool f(Node element)) => Collections.every(this, f);
+ bool some(bool f(Node element)) => Collections.some(this, f);
-/// @domName Metadata; @docsEditable true
-class Metadata native "*Metadata" {
+ bool get isEmpty => this.length == 0;
- /// @domName Metadata.modificationTime; @docsEditable true
- final Date modificationTime;
+ // From List<Node>:
+ void set length(int value) {
+ throw new UnsupportedError("Cannot resize immutable List.");
+ }
- /// @domName Metadata.size; @docsEditable true
- final int size;
-}
-// 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.
+ void clear() {
+ throw new UnsupportedError("Cannot clear immutable List.");
+ }
-// WARNING: Do not edit - generated code.
+ void sort([int compare(Node a, Node b)]) {
+ throw new UnsupportedError("Cannot sort immutable List.");
+ }
+ int indexOf(Node element, [int start = 0]) =>
+ Lists.indexOf(this, element, start, this.length);
-typedef void MetadataCallback(Metadata metadata);
-// 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.
+ int lastIndexOf(Node element, [int start]) {
+ if (start == null) start = length - 1;
+ return Lists.lastIndexOf(this, element, start);
+ }
+ Node get first => this[0];
-/// @domName HTMLMeterElement; @docsEditable true
-class MeterElement extends Element native "*HTMLMeterElement" {
+ Node get last => this[length - 1];
- ///@docsEditable true
- factory MeterElement() => document.$dom_createElement("meter");
+ Node removeAt(int pos) {
+ throw new UnsupportedError("Cannot removeAt on immutable List.");
+ }
- /// @domName HTMLMeterElement.high; @docsEditable true
- num high;
+ Node removeLast() {
+ throw new UnsupportedError("Cannot removeLast on immutable List.");
+ }
- /// @domName HTMLMeterElement.labels; @docsEditable true
- @Returns('NodeList') @Creates('NodeList')
- final List<Node> labels;
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
+ throw new UnsupportedError("Cannot setRange on immutable List.");
+ }
- /// @domName HTMLMeterElement.low; @docsEditable true
- num low;
+ void removeRange(int start, int rangeLength) {
+ throw new UnsupportedError("Cannot removeRange on immutable List.");
+ }
- /// @domName HTMLMeterElement.max; @docsEditable true
- num max;
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
+ throw new UnsupportedError("Cannot insertRange on immutable List.");
+ }
- /// @domName HTMLMeterElement.min; @docsEditable true
- num min;
+ List<Node> getRange(int start, int rangeLength) =>
+ Lists.getRange(this, start, rangeLength, <Node>[]);
- /// @domName HTMLMeterElement.optimum; @docsEditable true
- num optimum;
+ // -- end List<Node> mixins.
- /// @domName HTMLMeterElement.value; @docsEditable true
- num value;
-}
-// 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 NamedNodeMap.getNamedItem; @docsEditable true
+ Node getNamedItem(String name) native;
+ /// @domName NamedNodeMap.getNamedItemNS; @docsEditable true
+ Node getNamedItemNS(String namespaceURI, String localName) native;
-/// @domName HTMLModElement; @docsEditable true
-class ModElement extends Element native "*HTMLModElement" {
+ /// @domName NamedNodeMap.item; @docsEditable true
+ Node item(int index) native;
- /// @domName HTMLModElement.cite; @docsEditable true
- String cite;
+ /// @domName NamedNodeMap.removeNamedItem; @docsEditable true
+ Node removeNamedItem(String name) native;
- /// @domName HTMLModElement.dateTime; @docsEditable true
- String dateTime;
+ /// @domName NamedNodeMap.removeNamedItemNS; @docsEditable true
+ Node removeNamedItemNS(String namespaceURI, String localName) native;
+
+ /// @domName NamedNodeMap.setNamedItem; @docsEditable true
+ Node setNamedItem(Node node) native;
+
+ /// @domName NamedNodeMap.setNamedItemNS; @docsEditable true
+ Node setNamedItemNS(Node node) 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 MouseEvent
-class MouseEvent extends UIEvent native "*MouseEvent" {
- factory MouseEvent(String type, Window view, int detail, int screenX,
- int screenY, int clientX, int clientY, int button, [bool canBubble = true,
- bool cancelable = true, bool ctrlKey = false, bool altKey = false,
- bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) =>
- _MouseEventFactoryProvider.createMouseEvent(
- type, view, detail, screenX, screenY,
- clientX, clientY, button, canBubble, cancelable,
- ctrlKey, altKey, shiftKey, metaKey,
- relatedTarget);
+/// @domName Navigator; @docsEditable true
+class Navigator native "*Navigator" {
- /// @domName MouseEvent.altKey; @docsEditable true
- final bool altKey;
+ /// @domName Navigator.language; @docsEditable true
+ String get language => JS('String', '#.language || #.userLanguage', this,
+ this);
+
+ /// @domName Navigator.appCodeName; @docsEditable true
+ final String appCodeName;
- /// @domName MouseEvent.button; @docsEditable true
- final int button;
+ /// @domName Navigator.appName; @docsEditable true
+ final String appName;
- /// @domName MouseEvent.clientX; @docsEditable true
- final int clientX;
+ /// @domName Navigator.appVersion; @docsEditable true
+ final String appVersion;
- /// @domName MouseEvent.clientY; @docsEditable true
- final int clientY;
+ /// @domName Navigator.cookieEnabled; @docsEditable true
+ final bool cookieEnabled;
- /// @domName MouseEvent.ctrlKey; @docsEditable true
- final bool ctrlKey;
+ /// @domName Navigator.geolocation; @docsEditable true
+ final Geolocation geolocation;
- /// @domName MouseEvent.dataTransfer; @docsEditable true
- final Clipboard dataTransfer;
+ /// @domName Navigator.mimeTypes; @docsEditable true
+ final DomMimeTypeArray mimeTypes;
- /// @domName MouseEvent.fromElement; @docsEditable true
- final Node fromElement;
+ /// @domName Navigator.onLine; @docsEditable true
+ final bool onLine;
- /// @domName MouseEvent.metaKey; @docsEditable true
- final bool metaKey;
+ /// @domName Navigator.platform; @docsEditable true
+ final String platform;
- /// @domName MouseEvent.relatedTarget; @docsEditable true
- EventTarget get relatedTarget => _convertNativeToDart_EventTarget(this._relatedTarget);
- @JSName('relatedTarget')
- @Creates('Node') @Returns('EventTarget|=Object')
- final dynamic _relatedTarget;
-
- /// @domName MouseEvent.screenX; @docsEditable true
- final int screenX;
+ /// @domName Navigator.plugins; @docsEditable true
+ final DomPluginArray plugins;
- /// @domName MouseEvent.screenY; @docsEditable true
- final int screenY;
+ /// @domName Navigator.product; @docsEditable true
+ final String product;
- /// @domName MouseEvent.shiftKey; @docsEditable true
- final bool shiftKey;
+ /// @domName Navigator.productSub; @docsEditable true
+ final String productSub;
- /// @domName MouseEvent.toElement; @docsEditable true
- final Node toElement;
+ /// @domName Navigator.userAgent; @docsEditable true
+ final String userAgent;
- /// @domName MouseEvent.webkitMovementX; @docsEditable true
- final int webkitMovementX;
+ /// @domName Navigator.vendor; @docsEditable true
+ final String vendor;
- /// @domName MouseEvent.webkitMovementY; @docsEditable true
- final int webkitMovementY;
+ /// @domName Navigator.vendorSub; @docsEditable true
+ final String vendorSub;
- /// @domName MouseEvent.x; @docsEditable true
- final int x;
+ /// @domName Navigator.webkitBattery; @docsEditable true
+ final BatteryManager webkitBattery;
- /// @domName MouseEvent.y; @docsEditable true
- final int y;
+ /// @domName Navigator.getStorageUpdates; @docsEditable true
+ void getStorageUpdates() native;
- /// @domName MouseEvent.initMouseEvent; @docsEditable true
- void $dom_initMouseEvent(String type, bool canBubble, bool cancelable, LocalWindow view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) {
- var relatedTarget_1 = _convertDartToNative_EventTarget(relatedTarget);
- _$dom_initMouseEvent_1(type, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget_1);
- return;
- }
- @JSName('initMouseEvent')
- void _$dom_initMouseEvent_1(type, canBubble, cancelable, LocalWindow view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) native;
+ /// @domName Navigator.javaEnabled; @docsEditable true
+ bool javaEnabled() native;
+ /// @domName Navigator.webkitGetGamepads; @docsEditable true
+ @Returns('_GamepadList') @Creates('_GamepadList')
+ List<Gamepad> webkitGetGamepads() native;
- int get offsetX {
- if (JS('bool', '!!#.offsetX', this)) {
- return JS('int', '#.offsetX', this);
- } else {
- // Firefox does not support offsetX.
- var target = this.target;
- if (!(target is Element)) {
- throw new UnsupportedError(
- 'offsetX is only supported on elements');
- }
- return this.clientX - this.target.getBoundingClientRect().left;
+ /// @domName Navigator.webkitGetUserMedia; @docsEditable true
+ void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback successCallback, [NavigatorUserMediaErrorCallback errorCallback]) {
+ if (?errorCallback) {
+ var options_1 = convertDartToNative_Dictionary(options);
+ _webkitGetUserMedia_1(options_1, successCallback, errorCallback);
+ return;
}
+ var options_2 = convertDartToNative_Dictionary(options);
+ _webkitGetUserMedia_2(options_2, successCallback);
+ return;
}
+ @JSName('webkitGetUserMedia')
+ void _webkitGetUserMedia_1(options, NavigatorUserMediaSuccessCallback successCallback, NavigatorUserMediaErrorCallback errorCallback) native;
+ @JSName('webkitGetUserMedia')
+ void _webkitGetUserMedia_2(options, NavigatorUserMediaSuccessCallback successCallback) native;
- int get offsetY {
- if (JS('bool', '!!#.offsetY', this)) {
- return JS('int', '#.offsetY', this);
- } else {
- // Firefox does not support offsetY.
- var target = this.target;
- if (!(target is Element)) {
- throw new UnsupportedError(
- 'offsetY is only supported on elements');
- }
- return this.clientY - this.target.getBoundingClientRect().top;
- }
- }
}
// 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.
+/// @domName NavigatorUserMediaError; @docsEditable true
+class NavigatorUserMediaError native "*NavigatorUserMediaError" {
-typedef void MutationCallback(List<MutationRecord> mutations, MutationObserver observer);
+ static const int PERMISSION_DENIED = 1;
+
+ /// @domName NavigatorUserMediaError.code; @docsEditable true
+ final int code;
+}
// 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.
-/// @domName MutationEvent; @docsEditable true
-class MutationEvent extends Event native "*MutationEvent" {
-
- static const int ADDITION = 2;
-
- static const int MODIFICATION = 1;
-
- static const int REMOVAL = 3;
-
- /// @domName MutationEvent.attrChange; @docsEditable true
- final int attrChange;
-
- /// @domName MutationEvent.attrName; @docsEditable true
- final String attrName;
- /// @domName MutationEvent.newValue; @docsEditable true
- final String newValue;
+typedef void NavigatorUserMediaErrorCallback(NavigatorUserMediaError 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.
- /// @domName MutationEvent.prevValue; @docsEditable true
- final String prevValue;
+// WARNING: Do not edit - generated code.
- /// @domName MutationEvent.relatedNode; @docsEditable true
- final Node relatedNode;
- /// @domName MutationEvent.initMutationEvent; @docsEditable true
- void initMutationEvent(String type, bool canBubble, bool cancelable, Node relatedNode, String prevValue, String newValue, String attrName, int attrChange) native;
-}
+typedef void NavigatorUserMediaSuccessCallback(LocalMediaStream stream);
// 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 MutationObserver
-class MutationObserver native "*MutationObserver" {
+/**
+ * Lazy implementation of the child nodes of an element that does not request
+ * the actual child nodes of an element until strictly necessary greatly
+ * improving performance for the typical cases where it is not required.
+ */
+class _ChildNodeListLazy implements List {
+ final Node _this;
- ///@docsEditable true
- factory MutationObserver(MutationCallback callback) => _MutationObserverFactoryProvider.createMutationObserver(callback);
+ _ChildNodeListLazy(this._this);
- /// @domName MutationObserver.disconnect; @docsEditable true
- void disconnect() native;
- /// @domName MutationObserver._observe; @docsEditable true
- void _observe(Node target, Map options) {
- var options_1 = convertDartToNative_Dictionary(options);
- __observe_1(target, options_1);
- return;
- }
- @JSName('observe')
- void __observe_1(Node target, options) native;
+ Node get first => JS('Node', '#.firstChild', _this);
+ Node get last => JS('Node', '#.lastChild', _this);
- /// @domName MutationObserver.takeRecords; @docsEditable true
- List<MutationRecord> takeRecords() native;
+ void add(Node value) {
+ _this.$dom_appendChild(value);
+ }
- void observe(Node target,
- {Map options,
- bool childList,
- bool attributes,
- bool characterData,
- bool subtree,
- bool attributeOldValue,
- bool characterDataOldValue,
- List<String> attributeFilter}) {
+ void addLast(Node value) {
+ _this.$dom_appendChild(value);
+ }
- // Parse options into map of known type.
- var parsedOptions = _createDict();
- if (options != null) {
- options.forEach((k, v) {
- if (_boolKeys.containsKey(k)) {
- _add(parsedOptions, k, true == v);
- } else if (k == 'attributeFilter') {
- _add(parsedOptions, k, _fixupList(v));
- } else {
- throw new ArgumentError(
- "Illegal MutationObserver.observe option '$k'");
- }
- });
+ void addAll(Collection<Node> collection) {
+ for (Node node in collection) {
+ _this.$dom_appendChild(node);
}
+ }
- // Override options passed in the map with named optional arguments.
- override(key, value) {
- if (value != null) _add(parsedOptions, key, value);
+ Node removeLast() {
+ final result = last;
+ if (result != null) {
+ _this.$dom_removeChild(result);
}
+ return result;
+ }
- override('childList', childList);
- override('attributes', attributes);
- override('characterData', characterData);
- override('subtree', subtree);
- override('attributeOldValue', attributeOldValue);
- override('characterDataOldValue', characterDataOldValue);
- if (attributeFilter != null) {
- override('attributeFilter', _fixupList(attributeFilter));
+ Node removeAt(int index) {
+ var result = this[index];
+ if (result != null) {
+ _this.$dom_removeChild(result);
}
+ return result;
+ }
- _call(target, parsedOptions);
+ void clear() {
+ _this.text = '';
}
- // TODO: Change to a set when const Sets are available.
- static final _boolKeys =
- const {'childList': true,
- 'attributes': true,
- 'characterData': true,
- 'subtree': true,
- 'attributeOldValue': true,
- 'characterDataOldValue': true };
+ void operator []=(int index, Node value) {
+ _this.$dom_replaceChild(value, this[index]);
+ }
+ Iterator<Node> iterator() => _this.$dom_childNodes.iterator();
- static _createDict() => JS('var', '{}');
- static _add(m, String key, value) { JS('void', '#[#] = #', m, key, value); }
- static _fixupList(list) => list; // TODO: Ensure is a JavaScript Array.
+ // TODO(jacobr): We can implement these methods much more efficiently by
+ // looking up the nodeList only once instead of once per iteration.
+ bool contains(Node element) => Collections.contains(this, element);
- // Call native function with no conversions.
- @JSName('observe')
- void _call(target, options) 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.
+ void forEach(void f(Node element)) => Collections.forEach(this, f);
+ dynamic reduce(dynamic initialValue,
+ dynamic combine(dynamic previousValue, Node element)) {
+ return Collections.reduce(this, initialValue, combine);
+ }
-/// @domName MutationRecord; @docsEditable true
-class MutationRecord native "*MutationRecord" {
+ Collection map(f(Node element)) => Collections.map(this, [], f);
- /// @domName MutationRecord.addedNodes; @docsEditable true
- @Returns('NodeList') @Creates('NodeList')
- final List<Node> addedNodes;
+ Collection<Node> filter(bool f(Node element)) =>
+ Collections.filter(this, <Node>[], f);
- /// @domName MutationRecord.attributeName; @docsEditable true
- final String attributeName;
+ bool every(bool f(Node element)) => Collections.every(this, f);
- /// @domName MutationRecord.attributeNamespace; @docsEditable true
- final String attributeNamespace;
+ bool some(bool f(Node element)) => Collections.some(this, f);
- /// @domName MutationRecord.nextSibling; @docsEditable true
- final Node nextSibling;
+ bool get isEmpty => this.length == 0;
- /// @domName MutationRecord.oldValue; @docsEditable true
- final String oldValue;
+ // From List<Node>:
- /// @domName MutationRecord.previousSibling; @docsEditable true
- final Node previousSibling;
-
- /// @domName MutationRecord.removedNodes; @docsEditable true
- @Returns('NodeList') @Creates('NodeList')
- final List<Node> removedNodes;
-
- /// @domName MutationRecord.target; @docsEditable true
- final Node target;
+ // TODO(jacobr): this could be implemented for child node lists.
+ // The exception we throw here is misleading.
+ void sort([int compare(Node a, Node b)]) {
+ throw new UnsupportedError("Cannot sort immutable List.");
+ }
- /// @domName MutationRecord.type; @docsEditable true
- final String type;
-}
-// 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.
+ int indexOf(Node element, [int start = 0]) =>
+ Lists.indexOf(this, element, start, this.length);
+ int lastIndexOf(Node element, [int start = 0]) =>
+ Lists.lastIndexOf(this, element, start);
-/// @domName NamedNodeMap; @docsEditable true
-class NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*NamedNodeMap" {
+ // FIXME: implement these.
+ void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
+ throw new UnsupportedError(
+ "Cannot setRange on immutable List.");
+ }
+ void removeRange(int start, int rangeLength) {
+ throw new UnsupportedError(
+ "Cannot removeRange on immutable List.");
+ }
+ void insertRange(int start, int rangeLength, [Node initialValue]) {
+ throw new UnsupportedError(
+ "Cannot insertRange on immutable List.");
+ }
+ List<Node> getRange(int start, int rangeLength) =>
+ Lists.getRange(this, start, rangeLength, <Node>[]);
- /// @domName NamedNodeMap.length; @docsEditable true
- int get length => JS("int", "#.length", this);
+ // -- end List<Node> mixins.
- Node operator[](int index) => JS("Node", "#[#]", this, index);
+ // TODO(jacobr): benchmark whether this is more efficient or whether caching
+ // a local copy of $dom_childNodes is more efficient.
+ int get length => _this.$dom_childNodes.length;
- void operator[]=(int index, Node value) {
- throw new UnsupportedError("Cannot assign element of immutable List.");
+ void set length(int value) {
+ throw new UnsupportedError(
+ "Cannot set length on immutable List.");
}
- // -- start List<Node> mixins.
- // Node is the element type.
- // From Iterable<Node>:
+ Node operator[](int index) => _this.$dom_childNodes[index];
+}
- Iterator<Node> 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<Node>(this);
+/// @domName Node
+class Node extends EventTarget native "*Node" {
+ List<Node> get nodes {
+ return new _ChildNodeListLazy(this);
}
- // From Collection<Node>:
-
- void add(Node value) {
- throw new UnsupportedError("Cannot add to immutable List.");
+ void set nodes(Collection<Node> value) {
+ // Copy list first since we don't want liveness during iteration.
+ // TODO(jacobr): there is a better way to do this.
+ List copy = new List.from(value);
+ text = '';
+ for (Node node in copy) {
+ $dom_appendChild(node);
+ }
}
- void addLast(Node value) {
- throw new UnsupportedError("Cannot add to immutable List.");
+ /**
+ * Removes this node from the DOM.
+ * @domName Node.removeChild
+ */
+ void remove() {
+ // TODO(jacobr): should we throw an exception if parent is already null?
+ // TODO(vsm): Use the native remove when available.
+ if (this.parentNode != null) {
+ final Node parent = this.parentNode;
+ parentNode.$dom_removeChild(this);
+ }
}
- void addAll(Collection<Node> collection) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
+ /**
+ * Replaces this node with another node.
+ * @domName Node.replaceChild
+ */
+ Node replaceWith(Node otherNode) {
+ try {
+ final Node parent = this.parentNode;
+ parent.$dom_replaceChild(otherNode, this);
+ } catch (e) {
- dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
- return Collections.reduce(this, initialValue, combine);
+ };
+ return this;
}
- bool contains(Node element) => Collections.contains(this, element);
- void forEach(void f(Node element)) => Collections.forEach(this, f);
+ static const int ATTRIBUTE_NODE = 2;
- Collection map(f(Node element)) => Collections.map(this, [], f);
+ static const int CDATA_SECTION_NODE = 4;
- Collection<Node> filter(bool f(Node element)) =>
- Collections.filter(this, <Node>[], f);
+ static const int COMMENT_NODE = 8;
- bool every(bool f(Node element)) => Collections.every(this, f);
+ static const int DOCUMENT_FRAGMENT_NODE = 11;
- bool some(bool f(Node element)) => Collections.some(this, f);
+ static const int DOCUMENT_NODE = 9;
- bool get isEmpty => this.length == 0;
+ static const int DOCUMENT_POSITION_CONTAINED_BY = 0x10;
- // From List<Node>:
- void set length(int value) {
- throw new UnsupportedError("Cannot resize immutable List.");
- }
+ static const int DOCUMENT_POSITION_CONTAINS = 0x08;
- void clear() {
- throw new UnsupportedError("Cannot clear immutable List.");
- }
+ static const int DOCUMENT_POSITION_DISCONNECTED = 0x01;
- void sort([int compare(Node a, Node b)]) {
- throw new UnsupportedError("Cannot sort immutable List.");
- }
+ static const int DOCUMENT_POSITION_FOLLOWING = 0x04;
- int indexOf(Node element, [int start = 0]) =>
- Lists.indexOf(this, element, start, this.length);
+ static const int DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
- int lastIndexOf(Node element, [int start]) {
- if (start == null) start = length - 1;
- return Lists.lastIndexOf(this, element, start);
- }
+ static const int DOCUMENT_POSITION_PRECEDING = 0x02;
- Node get first => this[0];
+ static const int DOCUMENT_TYPE_NODE = 10;
- Node get last => this[length - 1];
+ static const int ELEMENT_NODE = 1;
- Node removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
- }
+ static const int ENTITY_NODE = 6;
- Node removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
- }
+ static const int ENTITY_REFERENCE_NODE = 5;
- void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
- throw new UnsupportedError("Cannot setRange on immutable List.");
- }
+ static const int NOTATION_NODE = 12;
- void removeRange(int start, int rangeLength) {
- throw new UnsupportedError("Cannot removeRange on immutable List.");
- }
+ static const int PROCESSING_INSTRUCTION_NODE = 7;
- void insertRange(int start, int rangeLength, [Node initialValue]) {
- throw new UnsupportedError("Cannot insertRange on immutable List.");
- }
+ static const int TEXT_NODE = 3;
- List<Node> getRange(int start, int rangeLength) =>
- Lists.getRange(this, start, rangeLength, <Node>[]);
+ /// @domName Node.attributes; @docsEditable true
+ @JSName('attributes')
+ final NamedNodeMap $dom_attributes;
- // -- end List<Node> mixins.
+ /// @domName Node.childNodes; @docsEditable true
+ @JSName('childNodes')
+ @Returns('NodeList') @Creates('NodeList')
+ final List<Node> $dom_childNodes;
- /// @domName NamedNodeMap.getNamedItem; @docsEditable true
- Node getNamedItem(String name) native;
+ /// @domName Node.firstChild; @docsEditable true
+ @JSName('firstChild')
+ final Node $dom_firstChild;
- /// @domName NamedNodeMap.getNamedItemNS; @docsEditable true
- Node getNamedItemNS(String namespaceURI, String localName) native;
+ /// @domName Node.lastChild; @docsEditable true
+ @JSName('lastChild')
+ final Node $dom_lastChild;
- /// @domName NamedNodeMap.item; @docsEditable true
- Node item(int index) native;
+ /// @domName Node.localName; @docsEditable true
+ @JSName('localName')
+ final String $dom_localName;
- /// @domName NamedNodeMap.removeNamedItem; @docsEditable true
- Node removeNamedItem(String name) native;
+ /// @domName Node.namespaceURI; @docsEditable true
+ @JSName('namespaceURI')
+ final String $dom_namespaceUri;
- /// @domName NamedNodeMap.removeNamedItemNS; @docsEditable true
- Node removeNamedItemNS(String namespaceURI, String localName) native;
+ /// @domName Node.nextSibling; @docsEditable true
+ @JSName('nextSibling')
+ final Node nextNode;
- /// @domName NamedNodeMap.setNamedItem; @docsEditable true
- Node setNamedItem(Node node) native;
+ /// @domName Node.nodeType; @docsEditable true
+ final int nodeType;
- /// @domName NamedNodeMap.setNamedItemNS; @docsEditable true
- Node setNamedItemNS(Node node) 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 Node.ownerDocument; @docsEditable true
+ @JSName('ownerDocument')
+ final Document document;
+ /// @domName Node.parentElement; @docsEditable true
+ @JSName('parentElement')
+ final Element parent;
-/// @domName Navigator; @docsEditable true
-class Navigator native "*Navigator" {
+ /// @domName Node.parentNode; @docsEditable true
+ final Node parentNode;
- /// @domName Navigator.language; @docsEditable true
- String get language => JS('String', '#.language || #.userLanguage', this,
- this);
-
- /// @domName Navigator.appCodeName; @docsEditable true
- final String appCodeName;
+ /// @domName Node.previousSibling; @docsEditable true
+ @JSName('previousSibling')
+ final Node previousNode;
- /// @domName Navigator.appName; @docsEditable true
- final String appName;
+ /// @domName Node.textContent; @docsEditable true
+ @JSName('textContent')
+ String text;
- /// @domName Navigator.appVersion; @docsEditable true
- final String appVersion;
+ /// @domName Node.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName Navigator.cookieEnabled; @docsEditable true
- final bool cookieEnabled;
+ /// @domName Node.appendChild; @docsEditable true
+ @JSName('appendChild')
+ Node $dom_appendChild(Node newChild) native;
- /// @domName Navigator.geolocation; @docsEditable true
- final Geolocation geolocation;
+ /// @domName Node.cloneNode; @docsEditable true
+ @JSName('cloneNode')
+ Node clone(bool deep) native;
- /// @domName Navigator.mimeTypes; @docsEditable true
- final DomMimeTypeArray mimeTypes;
+ /// @domName Node.contains; @docsEditable true
+ bool contains(Node other) native;
- /// @domName Navigator.onLine; @docsEditable true
- final bool onLine;
+ /// @domName Node.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event event) native;
- /// @domName Navigator.platform; @docsEditable true
- final String platform;
+ /// @domName Node.hasChildNodes; @docsEditable true
+ bool hasChildNodes() native;
- /// @domName Navigator.plugins; @docsEditable true
- final DomPluginArray plugins;
+ /// @domName Node.insertBefore; @docsEditable true
+ Node insertBefore(Node newChild, Node refChild) native;
- /// @domName Navigator.product; @docsEditable true
- final String product;
+ /// @domName Node.removeChild; @docsEditable true
+ @JSName('removeChild')
+ Node $dom_removeChild(Node oldChild) native;
- /// @domName Navigator.productSub; @docsEditable true
- final String productSub;
+ /// @domName Node.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName Navigator.userAgent; @docsEditable true
- final String userAgent;
+ /// @domName Node.replaceChild; @docsEditable true
+ @JSName('replaceChild')
+ Node $dom_replaceChild(Node newChild, Node oldChild) native;
- /// @domName Navigator.vendor; @docsEditable true
- final String vendor;
+}
+// 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.vendorSub; @docsEditable true
- final String vendorSub;
- /// @domName Navigator.webkitBattery; @docsEditable true
- final BatteryManager webkitBattery;
+/// @domName NodeFilter; @docsEditable true
+class NodeFilter native "*NodeFilter" {
- /// @domName Navigator.getStorageUpdates; @docsEditable true
- void getStorageUpdates() native;
+ static const int FILTER_ACCEPT = 1;
- /// @domName Navigator.javaEnabled; @docsEditable true
- bool javaEnabled() native;
+ static const int FILTER_REJECT = 2;
- /// @domName Navigator.webkitGetGamepads; @docsEditable true
- @Returns('_GamepadList') @Creates('_GamepadList')
- List<Gamepad> webkitGetGamepads() native;
+ static const int FILTER_SKIP = 3;
- /// @domName Navigator.webkitGetUserMedia; @docsEditable true
- void webkitGetUserMedia(Map options, NavigatorUserMediaSuccessCallback successCallback, [NavigatorUserMediaErrorCallback errorCallback]) {
- if (?errorCallback) {
- var options_1 = convertDartToNative_Dictionary(options);
- _webkitGetUserMedia_1(options_1, successCallback, errorCallback);
- return;
- }
- var options_2 = convertDartToNative_Dictionary(options);
- _webkitGetUserMedia_2(options_2, successCallback);
- return;
- }
- @JSName('webkitGetUserMedia')
- void _webkitGetUserMedia_1(options, NavigatorUserMediaSuccessCallback successCallback, NavigatorUserMediaErrorCallback errorCallback) native;
- @JSName('webkitGetUserMedia')
- void _webkitGetUserMedia_2(options, NavigatorUserMediaSuccessCallback successCallback) native;
+ static const int SHOW_ALL = 0xFFFFFFFF;
-}
-// 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.
+ static const int SHOW_ATTRIBUTE = 0x00000002;
+ static const int SHOW_CDATA_SECTION = 0x00000008;
-/// @domName NavigatorUserMediaError; @docsEditable true
-class NavigatorUserMediaError native "*NavigatorUserMediaError" {
+ static const int SHOW_COMMENT = 0x00000080;
- static const int PERMISSION_DENIED = 1;
+ static const int SHOW_DOCUMENT = 0x00000100;
- /// @domName NavigatorUserMediaError.code; @docsEditable true
- final int code;
+ static const int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
+
+ static const int SHOW_DOCUMENT_TYPE = 0x00000200;
+
+ static const int SHOW_ELEMENT = 0x00000001;
+
+ static const int SHOW_ENTITY = 0x00000020;
+
+ static const int SHOW_ENTITY_REFERENCE = 0x00000010;
+
+ static const int SHOW_NOTATION = 0x00000800;
+
+ static const int SHOW_PROCESSING_INSTRUCTION = 0x00000040;
+
+ static const int SHOW_TEXT = 0x00000004;
+
+ /// @domName NodeFilter.acceptNode; @docsEditable true
+ int acceptNode(Node n) 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.
+/// @domName NodeIterator; @docsEditable true
+class NodeIterator native "*NodeIterator" {
-typedef void NavigatorUserMediaErrorCallback(NavigatorUserMediaError 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.
+ /// @domName NodeIterator.expandEntityReferences; @docsEditable true
+ final bool expandEntityReferences;
-// WARNING: Do not edit - generated code.
+ /// @domName NodeIterator.filter; @docsEditable true
+ final NodeFilter filter;
+ /// @domName NodeIterator.pointerBeforeReferenceNode; @docsEditable true
+ final bool pointerBeforeReferenceNode;
-typedef void NavigatorUserMediaSuccessCallback(LocalMediaStream stream);
+ /// @domName NodeIterator.referenceNode; @docsEditable true
+ final Node referenceNode;
+
+ /// @domName NodeIterator.root; @docsEditable true
+ final Node root;
+
+ /// @domName NodeIterator.whatToShow; @docsEditable true
+ final int whatToShow;
+
+ /// @domName NodeIterator.detach; @docsEditable true
+ void detach() native;
+
+ /// @domName NodeIterator.nextNode; @docsEditable true
+ Node nextNode() native;
+
+ /// @domName NodeIterator.previousNode; @docsEditable true
+ Node previousNode() 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.
-/**
- * Lazy implementation of the child nodes of an element that does not request
- * the actual child nodes of an element until strictly necessary greatly
- * improving performance for the typical cases where it is not required.
- */
-class _ChildNodeListLazy implements List {
- final Node _this;
-
- _ChildNodeListLazy(this._this);
-
+/// @domName NodeList; @docsEditable true
+class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeList" {
- Node get first => JS('Node', '#.firstChild', _this);
- Node get last => JS('Node', '#.lastChild', _this);
+ /// @domName NodeList.length; @docsEditable true
+ int get length => JS("int", "#.length", this);
- void add(Node value) {
- _this.$dom_appendChild(value);
- }
+ Node operator[](int index) => JS("Node", "#[#]", this, index);
- void addLast(Node value) {
- _this.$dom_appendChild(value);
+ void operator[]=(int index, Node value) {
+ throw new UnsupportedError("Cannot assign element of immutable List.");
}
+ // -- start List<Node> mixins.
+ // Node is the element type.
+ // From Iterable<Node>:
- void addAll(Collection<Node> collection) {
- for (Node node in collection) {
- _this.$dom_appendChild(node);
- }
+ Iterator<Node> 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<Node>(this);
}
- Node removeLast() {
- final result = last;
- if (result != null) {
- _this.$dom_removeChild(result);
- }
- return result;
- }
+ // From Collection<Node>:
- Node removeAt(int index) {
- var result = this[index];
- if (result != null) {
- _this.$dom_removeChild(result);
- }
- return result;
+ void add(Node value) {
+ throw new UnsupportedError("Cannot add to immutable List.");
}
- void clear() {
- _this.text = '';
+ void addLast(Node value) {
+ throw new UnsupportedError("Cannot add to immutable List.");
}
- void operator []=(int index, Node value) {
- _this.$dom_replaceChild(value, this[index]);
+ void addAll(Collection<Node> collection) {
+ throw new UnsupportedError("Cannot add to immutable List.");
}
- Iterator<Node> iterator() => _this.$dom_childNodes.iterator();
+ dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
+ return Collections.reduce(this, initialValue, combine);
+ }
- // TODO(jacobr): We can implement these methods much more efficiently by
- // looking up the nodeList only once instead of once per iteration.
bool contains(Node element) => Collections.contains(this, element);
void forEach(void f(Node element)) => Collections.forEach(this, f);
- dynamic reduce(dynamic initialValue,
- dynamic combine(dynamic previousValue, Node element)) {
- return Collections.reduce(this, initialValue, combine);
- }
-
Collection map(f(Node element)) => Collections.map(this, [], f);
Collection<Node> filter(bool f(Node element)) =>
@@ -14369,9 +14060,14 @@ class _ChildNodeListLazy implements List {
bool get isEmpty => this.length == 0;
// From List<Node>:
+ void set length(int value) {
+ throw new UnsupportedError("Cannot resize immutable List.");
+ }
+
+ void clear() {
+ throw new UnsupportedError("Cannot clear immutable List.");
+ }
- // TODO(jacobr): this could be implemented for child node lists.
- // The exception we throw here is misleading.
void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -14379,1291 +14075,934 @@ class _ChildNodeListLazy implements List {
int indexOf(Node element, [int start = 0]) =>
Lists.indexOf(this, element, start, this.length);
- int lastIndexOf(Node element, [int start = 0]) =>
- Lists.lastIndexOf(this, element, start);
+ int lastIndexOf(Node element, [int start]) {
+ if (start == null) start = length - 1;
+ return Lists.lastIndexOf(this, element, start);
+ }
+
+ Node get first => this[0];
+
+ Node get last => this[length - 1];
+
+ Node removeAt(int pos) {
+ throw new UnsupportedError("Cannot removeAt on immutable List.");
+ }
+
+ Node removeLast() {
+ throw new UnsupportedError("Cannot removeLast on immutable List.");
+ }
- // FIXME: implement these.
void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
- throw new UnsupportedError(
- "Cannot setRange on immutable List.");
+ throw new UnsupportedError("Cannot setRange on immutable List.");
}
+
void removeRange(int start, int rangeLength) {
- throw new UnsupportedError(
- "Cannot removeRange on immutable List.");
+ throw new UnsupportedError("Cannot removeRange on immutable List.");
}
+
void insertRange(int start, int rangeLength, [Node initialValue]) {
- throw new UnsupportedError(
- "Cannot insertRange on immutable List.");
+ throw new UnsupportedError("Cannot insertRange on immutable List.");
}
+
List<Node> getRange(int start, int rangeLength) =>
Lists.getRange(this, start, rangeLength, <Node>[]);
// -- end List<Node> mixins.
- // TODO(jacobr): benchmark whether this is more efficient or whether caching
- // a local copy of $dom_childNodes is more efficient.
- int get length => _this.$dom_childNodes.length;
-
- void set length(int value) {
- throw new UnsupportedError(
- "Cannot set length on immutable List.");
- }
-
- Node operator[](int index) => _this.$dom_childNodes[index];
+ /// @domName NodeList.item; @docsEditable true
+ @JSName('item')
+ Node _item(int 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.
-/// @domName Node
-class Node extends EventTarget native "*Node" {
- List<Node> get nodes {
- return new _ChildNodeListLazy(this);
- }
-
- void set nodes(Collection<Node> value) {
- // Copy list first since we don't want liveness during iteration.
- // TODO(jacobr): there is a better way to do this.
- List copy = new List.from(value);
- text = '';
- for (Node node in copy) {
- $dom_appendChild(node);
- }
- }
-
- /**
- * Removes this node from the DOM.
- * @domName Node.removeChild
- */
- void remove() {
- // TODO(jacobr): should we throw an exception if parent is already null?
- // TODO(vsm): Use the native remove when available.
- if (this.parentNode != null) {
- final Node parent = this.parentNode;
- parentNode.$dom_removeChild(this);
- }
- }
-
- /**
- * Replaces this node with another node.
- * @domName Node.replaceChild
- */
- Node replaceWith(Node otherNode) {
- try {
- final Node parent = this.parentNode;
- parent.$dom_replaceChild(otherNode, this);
- } catch (e) {
-
- };
- return this;
- }
-
-
- static const int ATTRIBUTE_NODE = 2;
-
- static const int CDATA_SECTION_NODE = 4;
- static const int COMMENT_NODE = 8;
+/// @domName Notation; @docsEditable true
+class Notation extends Node native "*Notation" {
- static const int DOCUMENT_FRAGMENT_NODE = 11;
+ /// @domName Notation.publicId; @docsEditable true
+ final String publicId;
- static const int DOCUMENT_NODE = 9;
+ /// @domName Notation.systemId; @docsEditable true
+ final String systemId;
+}
+// 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.
- static const int DOCUMENT_POSITION_CONTAINED_BY = 0x10;
- static const int DOCUMENT_POSITION_CONTAINS = 0x08;
+/// @domName Notification; @docsEditable true
+class Notification extends EventTarget native "*Notification" {
- static const int DOCUMENT_POSITION_DISCONNECTED = 0x01;
+ ///@docsEditable true
+ factory Notification(String title, [Map options]) {
+ if (!?options) {
+ return _NotificationFactoryProvider.createNotification(title);
+ }
+ return _NotificationFactoryProvider.createNotification(title, options);
+ }
- static const int DOCUMENT_POSITION_FOLLOWING = 0x04;
+ /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
+ NotificationEvents get on =>
+ new NotificationEvents(this);
- static const int DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
+ /// @domName Notification.dir; @docsEditable true
+ String dir;
- static const int DOCUMENT_POSITION_PRECEDING = 0x02;
+ /// @domName Notification.permission; @docsEditable true
+ final String permission;
- static const int DOCUMENT_TYPE_NODE = 10;
+ /// @domName Notification.replaceId; @docsEditable true
+ String replaceId;
- static const int ELEMENT_NODE = 1;
+ /// @domName Notification.tag; @docsEditable true
+ String tag;
- static const int ENTITY_NODE = 6;
+ /// @domName Notification.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- static const int ENTITY_REFERENCE_NODE = 5;
+ /// @domName Notification.cancel; @docsEditable true
+ void cancel() native;
- static const int NOTATION_NODE = 12;
+ /// @domName Notification.close; @docsEditable true
+ void close() native;
- static const int PROCESSING_INSTRUCTION_NODE = 7;
+ /// @domName Notification.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event evt) native;
- static const int TEXT_NODE = 3;
+ /// @domName Notification.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName Node.attributes; @docsEditable true
- @JSName('attributes')
- final NamedNodeMap $dom_attributes;
+ /// @domName Notification.requestPermission; @docsEditable true
+ static void requestPermission(NotificationPermissionCallback callback) native;
- /// @domName Node.childNodes; @docsEditable true
- @JSName('childNodes')
- @Returns('NodeList') @Creates('NodeList')
- final List<Node> $dom_childNodes;
+ /// @domName Notification.show; @docsEditable true
+ void show() native;
+}
- /// @domName Node.firstChild; @docsEditable true
- @JSName('firstChild')
- final Node $dom_firstChild;
+/// @docsEditable true
+class NotificationEvents extends Events {
+ /// @docsEditable true
+ NotificationEvents(EventTarget _ptr) : super(_ptr);
- /// @domName Node.lastChild; @docsEditable true
- @JSName('lastChild')
- final Node $dom_lastChild;
+ /// @docsEditable true
+ EventListenerList get click => this['click'];
- /// @domName Node.localName; @docsEditable true
- @JSName('localName')
- final String $dom_localName;
+ /// @docsEditable true
+ EventListenerList get close => this['close'];
- /// @domName Node.namespaceURI; @docsEditable true
- @JSName('namespaceURI')
- final String $dom_namespaceUri;
+ /// @docsEditable true
+ EventListenerList get display => this['display'];
- /// @domName Node.nextSibling; @docsEditable true
- @JSName('nextSibling')
- final Node nextNode;
+ /// @docsEditable true
+ EventListenerList get error => this['error'];
- /// @domName Node.nodeType; @docsEditable true
- final int nodeType;
+ /// @docsEditable true
+ EventListenerList get show => this['show'];
+}
+// 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 Node.ownerDocument; @docsEditable true
- @JSName('ownerDocument')
- final Document document;
- /// @domName Node.parentElement; @docsEditable true
- @JSName('parentElement')
- final Element parent;
+/// @domName NotificationCenter; @docsEditable true
+class NotificationCenter native "*NotificationCenter" {
- /// @domName Node.parentNode; @docsEditable true
- final Node parentNode;
+ /// @domName NotificationCenter.checkPermission; @docsEditable true
+ int checkPermission() native;
- /// @domName Node.previousSibling; @docsEditable true
- @JSName('previousSibling')
- final Node previousNode;
+ /// @domName NotificationCenter.createHTMLNotification; @docsEditable true
+ @JSName('createHTMLNotification')
+ Notification createHtmlNotification(String url) native;
- /// @domName Node.textContent; @docsEditable true
- @JSName('textContent')
- String text;
+ /// @domName NotificationCenter.createNotification; @docsEditable true
+ Notification createNotification(String iconUrl, String title, String body) native;
- /// @domName Node.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @domName NotificationCenter.requestPermission; @docsEditable true
+ void requestPermission(VoidCallback callback) 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 Node.appendChild; @docsEditable true
- @JSName('appendChild')
- Node $dom_appendChild(Node newChild) native;
+// WARNING: Do not edit - generated code.
- /// @domName Node.cloneNode; @docsEditable true
- @JSName('cloneNode')
- Node clone(bool deep) native;
- /// @domName Node.contains; @docsEditable true
- bool contains(Node other) native;
+typedef void NotificationPermissionCallback(String permission);
+// 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 Node.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
- /// @domName Node.hasChildNodes; @docsEditable true
- bool hasChildNodes() native;
+/// @domName HTMLOListElement; @docsEditable true
+class OListElement extends Element native "*HTMLOListElement" {
- /// @domName Node.insertBefore; @docsEditable true
- Node insertBefore(Node newChild, Node refChild) native;
+ ///@docsEditable true
+ factory OListElement() => document.$dom_createElement("ol");
- /// @domName Node.removeChild; @docsEditable true
- @JSName('removeChild')
- Node $dom_removeChild(Node oldChild) native;
+ /// @domName HTMLOListElement.compact; @docsEditable true
+ bool compact;
- /// @domName Node.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @domName HTMLOListElement.reversed; @docsEditable true
+ bool reversed;
- /// @domName Node.replaceChild; @docsEditable true
- @JSName('replaceChild')
- Node $dom_replaceChild(Node newChild, Node oldChild) native;
+ /// @domName HTMLOListElement.start; @docsEditable true
+ int start;
+ /// @domName HTMLOListElement.type; @docsEditable true
+ String type;
}
// 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 NodeFilter; @docsEditable true
-class NodeFilter native "*NodeFilter" {
-
- static const int FILTER_ACCEPT = 1;
+/// @domName HTMLObjectElement; @docsEditable true
+class ObjectElement extends Element native "*HTMLObjectElement" {
- static const int FILTER_REJECT = 2;
+ ///@docsEditable true
+ factory ObjectElement() => document.$dom_createElement("object");
- static const int FILTER_SKIP = 3;
+ /// @domName HTMLObjectElement.align; @docsEditable true
+ String align;
- static const int SHOW_ALL = 0xFFFFFFFF;
+ /// @domName HTMLObjectElement.archive; @docsEditable true
+ String archive;
- static const int SHOW_ATTRIBUTE = 0x00000002;
+ /// @domName HTMLObjectElement.border; @docsEditable true
+ String border;
- static const int SHOW_CDATA_SECTION = 0x00000008;
+ /// @domName HTMLObjectElement.code; @docsEditable true
+ String code;
- static const int SHOW_COMMENT = 0x00000080;
+ /// @domName HTMLObjectElement.codeBase; @docsEditable true
+ String codeBase;
- static const int SHOW_DOCUMENT = 0x00000100;
+ /// @domName HTMLObjectElement.codeType; @docsEditable true
+ String codeType;
- static const int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
+ /// @domName HTMLObjectElement.data; @docsEditable true
+ String data;
- static const int SHOW_DOCUMENT_TYPE = 0x00000200;
-
- static const int SHOW_ELEMENT = 0x00000001;
-
- static const int SHOW_ENTITY = 0x00000020;
-
- static const int SHOW_ENTITY_REFERENCE = 0x00000010;
-
- static const int SHOW_NOTATION = 0x00000800;
+ /// @domName HTMLObjectElement.declare; @docsEditable true
+ bool declare;
- static const int SHOW_PROCESSING_INSTRUCTION = 0x00000040;
+ /// @domName HTMLObjectElement.form; @docsEditable true
+ final FormElement form;
- static const int SHOW_TEXT = 0x00000004;
+ /// @domName HTMLObjectElement.height; @docsEditable true
+ String height;
- /// @domName NodeFilter.acceptNode; @docsEditable true
- int acceptNode(Node n) 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 HTMLObjectElement.hspace; @docsEditable true
+ int hspace;
+ /// @domName HTMLObjectElement.name; @docsEditable true
+ String name;
-/// @domName NodeIterator; @docsEditable true
-class NodeIterator native "*NodeIterator" {
+ /// @domName HTMLObjectElement.standby; @docsEditable true
+ String standby;
- /// @domName NodeIterator.expandEntityReferences; @docsEditable true
- final bool expandEntityReferences;
+ /// @domName HTMLObjectElement.type; @docsEditable true
+ String type;
- /// @domName NodeIterator.filter; @docsEditable true
- final NodeFilter filter;
+ /// @domName HTMLObjectElement.useMap; @docsEditable true
+ String useMap;
- /// @domName NodeIterator.pointerBeforeReferenceNode; @docsEditable true
- final bool pointerBeforeReferenceNode;
+ /// @domName HTMLObjectElement.validationMessage; @docsEditable true
+ final String validationMessage;
- /// @domName NodeIterator.referenceNode; @docsEditable true
- final Node referenceNode;
+ /// @domName HTMLObjectElement.validity; @docsEditable true
+ final ValidityState validity;
- /// @domName NodeIterator.root; @docsEditable true
- final Node root;
+ /// @domName HTMLObjectElement.vspace; @docsEditable true
+ int vspace;
- /// @domName NodeIterator.whatToShow; @docsEditable true
- final int whatToShow;
+ /// @domName HTMLObjectElement.width; @docsEditable true
+ String width;
- /// @domName NodeIterator.detach; @docsEditable true
- void detach() native;
+ /// @domName HTMLObjectElement.willValidate; @docsEditable true
+ final bool willValidate;
- /// @domName NodeIterator.nextNode; @docsEditable true
- Node nextNode() native;
+ /// @domName HTMLObjectElement.checkValidity; @docsEditable true
+ bool checkValidity() native;
- /// @domName NodeIterator.previousNode; @docsEditable true
- Node previousNode() native;
+ /// @domName HTMLObjectElement.setCustomValidity; @docsEditable true
+ void setCustomValidity(String error) 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 NodeList; @docsEditable true
-class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeList" {
-
- /// @domName NodeList.length; @docsEditable true
- int get length => JS("int", "#.length", this);
-
- Node operator[](int index) => JS("Node", "#[#]", this, index);
-
- void operator[]=(int index, Node value) {
- throw new UnsupportedError("Cannot assign element of immutable List.");
- }
- // -- start List<Node> mixins.
- // Node is the element type.
-
- // From Iterable<Node>:
-
- Iterator<Node> 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<Node>(this);
- }
+/// @domName OESElementIndexUint; @docsEditable true
+class OesElementIndexUint native "*OESElementIndexUint" {
+}
+// 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.
- // From Collection<Node>:
- void add(Node value) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
+/// @domName OESStandardDerivatives; @docsEditable true
+class OesStandardDerivatives native "*OESStandardDerivatives" {
- void addLast(Node value) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
+ static const int FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
+}
+// 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.
- void addAll(Collection<Node> collection) {
- throw new UnsupportedError("Cannot add to immutable List.");
- }
- dynamic reduce(dynamic initialValue, dynamic combine(dynamic, Node)) {
- return Collections.reduce(this, initialValue, combine);
- }
+/// @domName OESTextureFloat; @docsEditable true
+class OesTextureFloat native "*OESTextureFloat" {
+}
+// 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.
- bool contains(Node element) => Collections.contains(this, element);
- void forEach(void f(Node element)) => Collections.forEach(this, f);
+/// @domName OESVertexArrayObject; @docsEditable true
+class OesVertexArrayObject native "*OESVertexArrayObject" {
- Collection map(f(Node element)) => Collections.map(this, [], f);
+ static const int VERTEX_ARRAY_BINDING_OES = 0x85B5;
- Collection<Node> filter(bool f(Node element)) =>
- Collections.filter(this, <Node>[], f);
+ /// @domName OESVertexArrayObject.bindVertexArrayOES; @docsEditable true
+ @JSName('bindVertexArrayOES')
+ void bindVertexArray(WebGLVertexArrayObject arrayObject) native;
- bool every(bool f(Node element)) => Collections.every(this, f);
+ /// @domName OESVertexArrayObject.createVertexArrayOES; @docsEditable true
+ @JSName('createVertexArrayOES')
+ WebGLVertexArrayObject createVertexArray() native;
- bool some(bool f(Node element)) => Collections.some(this, f);
+ /// @domName OESVertexArrayObject.deleteVertexArrayOES; @docsEditable true
+ @JSName('deleteVertexArrayOES')
+ void deleteVertexArray(WebGLVertexArrayObject arrayObject) native;
- bool get isEmpty => this.length == 0;
+ /// @domName OESVertexArrayObject.isVertexArrayOES; @docsEditable true
+ @JSName('isVertexArrayOES')
+ bool isVertexArray(WebGLVertexArrayObject arrayObject) 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.
- // From List<Node>:
- void set length(int value) {
- throw new UnsupportedError("Cannot resize immutable List.");
- }
- void clear() {
- throw new UnsupportedError("Cannot clear immutable List.");
- }
+/// @domName HTMLOptGroupElement; @docsEditable true
+class OptGroupElement extends Element native "*HTMLOptGroupElement" {
- void sort([int compare(Node a, Node b)]) {
- throw new UnsupportedError("Cannot sort immutable List.");
- }
+ ///@docsEditable true
+ factory OptGroupElement() => document.$dom_createElement("optgroup");
- int indexOf(Node element, [int start = 0]) =>
- Lists.indexOf(this, element, start, this.length);
+ /// @domName HTMLOptGroupElement.disabled; @docsEditable true
+ bool disabled;
- int lastIndexOf(Node element, [int start]) {
- if (start == null) start = length - 1;
- return Lists.lastIndexOf(this, element, start);
- }
+ /// @domName HTMLOptGroupElement.label; @docsEditable true
+ String label;
+}
+// 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.
- Node get first => this[0];
- Node get last => this[length - 1];
+/// @domName HTMLOptionElement; @docsEditable true
+class OptionElement extends Element native "*HTMLOptionElement" {
- Node removeAt(int pos) {
- throw new UnsupportedError("Cannot removeAt on immutable List.");
+ ///@docsEditable true
+ factory OptionElement([String data, String value, bool defaultSelected, bool selected]) {
+ if (!?data) {
+ return _OptionElementFactoryProvider.createOptionElement();
+ }
+ if (!?value) {
+ return _OptionElementFactoryProvider.createOptionElement(data);
+ }
+ if (!?defaultSelected) {
+ return _OptionElementFactoryProvider.createOptionElement(data, value);
+ }
+ if (!?selected) {
+ return _OptionElementFactoryProvider.createOptionElement(data, value, defaultSelected);
+ }
+ return _OptionElementFactoryProvider.createOptionElement(data, value, defaultSelected, selected);
}
- Node removeLast() {
- throw new UnsupportedError("Cannot removeLast on immutable List.");
- }
+ /// @domName HTMLOptionElement.defaultSelected; @docsEditable true
+ bool defaultSelected;
- void setRange(int start, int rangeLength, List<Node> from, [int startFrom]) {
- throw new UnsupportedError("Cannot setRange on immutable List.");
- }
+ /// @domName HTMLOptionElement.disabled; @docsEditable true
+ bool disabled;
- void removeRange(int start, int rangeLength) {
- throw new UnsupportedError("Cannot removeRange on immutable List.");
- }
+ /// @domName HTMLOptionElement.form; @docsEditable true
+ final FormElement form;
- void insertRange(int start, int rangeLength, [Node initialValue]) {
- throw new UnsupportedError("Cannot insertRange on immutable List.");
- }
+ /// @domName HTMLOptionElement.index; @docsEditable true
+ final int index;
- List<Node> getRange(int start, int rangeLength) =>
- Lists.getRange(this, start, rangeLength, <Node>[]);
+ /// @domName HTMLOptionElement.label; @docsEditable true
+ String label;
- // -- end List<Node> mixins.
+ /// @domName HTMLOptionElement.selected; @docsEditable true
+ bool selected;
- /// @domName NodeList.item; @docsEditable true
- @JSName('item')
- Node _item(int index) native;
+ /// @domName HTMLOptionElement.value; @docsEditable true
+ String value;
}
// 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 Notation; @docsEditable true
-class Notation extends Node native "*Notation" {
+/// @domName HTMLOutputElement; @docsEditable true
+class OutputElement extends Element native "*HTMLOutputElement" {
- /// @domName Notation.publicId; @docsEditable true
- final String publicId;
+ ///@docsEditable true
+ factory OutputElement() => document.$dom_createElement("output");
- /// @domName Notation.systemId; @docsEditable true
- final String systemId;
-}
-// 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 HTMLOutputElement.defaultValue; @docsEditable true
+ String defaultValue;
+ /// @domName HTMLOutputElement.form; @docsEditable true
+ final FormElement form;
-/// @domName Notification; @docsEditable true
-class Notification extends EventTarget native "*Notification" {
+ /// @domName HTMLOutputElement.htmlFor; @docsEditable true
+ DomSettableTokenList htmlFor;
- ///@docsEditable true
- factory Notification(String title, [Map options]) {
- if (!?options) {
- return _NotificationFactoryProvider.createNotification(title);
- }
- return _NotificationFactoryProvider.createNotification(title, options);
- }
-
- /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
- NotificationEvents get on =>
- new NotificationEvents(this);
-
- /// @domName Notification.dir; @docsEditable true
- String dir;
+ /// @domName HTMLOutputElement.labels; @docsEditable true
+ @Returns('NodeList') @Creates('NodeList')
+ final List<Node> labels;
- /// @domName Notification.permission; @docsEditable true
- final String permission;
+ /// @domName HTMLOutputElement.name; @docsEditable true
+ String name;
- /// @domName Notification.replaceId; @docsEditable true
- String replaceId;
+ /// @domName HTMLOutputElement.type; @docsEditable true
+ final String type;
- /// @domName Notification.tag; @docsEditable true
- String tag;
+ /// @domName HTMLOutputElement.validationMessage; @docsEditable true
+ final String validationMessage;
- /// @domName Notification.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @domName HTMLOutputElement.validity; @docsEditable true
+ final ValidityState validity;
- /// @domName Notification.cancel; @docsEditable true
- void cancel() native;
+ /// @domName HTMLOutputElement.value; @docsEditable true
+ String value;
- /// @domName Notification.close; @docsEditable true
- void close() native;
+ /// @domName HTMLOutputElement.willValidate; @docsEditable true
+ final bool willValidate;
- /// @domName Notification.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ /// @domName HTMLOutputElement.checkValidity; @docsEditable true
+ bool checkValidity() native;
- /// @domName Notification.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @domName HTMLOutputElement.setCustomValidity; @docsEditable true
+ void setCustomValidity(String error) 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 Notification.requestPermission; @docsEditable true
- static void requestPermission(NotificationPermissionCallback callback) native;
- /// @domName Notification.show; @docsEditable true
- void show() native;
-}
+/// @domName OverflowEvent; @docsEditable true
+class OverflowEvent extends Event native "*OverflowEvent" {
-/// @docsEditable true
-class NotificationEvents extends Events {
- /// @docsEditable true
- NotificationEvents(EventTarget _ptr) : super(_ptr);
+ static const int BOTH = 2;
- /// @docsEditable true
- EventListenerList get click => this['click'];
+ static const int HORIZONTAL = 0;
- /// @docsEditable true
- EventListenerList get close => this['close'];
+ static const int VERTICAL = 1;
- /// @docsEditable true
- EventListenerList get display => this['display'];
+ /// @domName OverflowEvent.horizontalOverflow; @docsEditable true
+ final bool horizontalOverflow;
- /// @docsEditable true
- EventListenerList get error => this['error'];
+ /// @domName OverflowEvent.orient; @docsEditable true
+ final int orient;
- /// @docsEditable true
- EventListenerList get show => this['show'];
+ /// @domName OverflowEvent.verticalOverflow; @docsEditable true
+ final bool verticalOverflow;
}
// 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 NotificationCenter; @docsEditable true
-class NotificationCenter native "*NotificationCenter" {
-
- /// @domName NotificationCenter.checkPermission; @docsEditable true
- int checkPermission() native;
-
- /// @domName NotificationCenter.createHTMLNotification; @docsEditable true
- @JSName('createHTMLNotification')
- Notification createHtmlNotification(String url) native;
+/// @domName PagePopupController; @docsEditable true
+class PagePopupController native "*PagePopupController" {
- /// @domName NotificationCenter.createNotification; @docsEditable true
- Notification createNotification(String iconUrl, String title, String body) native;
+ /// @domName PagePopupController.localizeNumberString; @docsEditable true
+ String localizeNumberString(String numberString) native;
- /// @domName NotificationCenter.requestPermission; @docsEditable true
- void requestPermission(VoidCallback callback) native;
+ /// @domName PagePopupController.setValueAndClosePopup; @docsEditable true
+ void setValueAndClosePopup(int numberValue, String stringValue) 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.
+/// @domName PageTransitionEvent; @docsEditable true
+class PageTransitionEvent extends Event native "*PageTransitionEvent" {
-typedef void NotificationPermissionCallback(String permission);
+ /// @domName PageTransitionEvent.persisted; @docsEditable true
+ final bool persisted;
+}
// 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 HTMLOListElement; @docsEditable true
-class OListElement extends Element native "*HTMLOListElement" {
+/// @domName HTMLParagraphElement; @docsEditable true
+class ParagraphElement extends Element native "*HTMLParagraphElement" {
///@docsEditable true
- factory OListElement() => document.$dom_createElement("ol");
-
- /// @domName HTMLOListElement.compact; @docsEditable true
- bool compact;
-
- /// @domName HTMLOListElement.reversed; @docsEditable true
- bool reversed;
-
- /// @domName HTMLOListElement.start; @docsEditable true
- int start;
+ factory ParagraphElement() => document.$dom_createElement("p");
- /// @domName HTMLOListElement.type; @docsEditable true
- String type;
+ /// @domName HTMLParagraphElement.align; @docsEditable true
+ String align;
}
// 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 HTMLObjectElement; @docsEditable true
-class ObjectElement extends Element native "*HTMLObjectElement" {
+/// @domName HTMLParamElement; @docsEditable true
+class ParamElement extends Element native "*HTMLParamElement" {
///@docsEditable true
- factory ObjectElement() => document.$dom_createElement("object");
-
- /// @domName HTMLObjectElement.align; @docsEditable true
- String align;
-
- /// @domName HTMLObjectElement.archive; @docsEditable true
- String archive;
-
- /// @domName HTMLObjectElement.border; @docsEditable true
- String border;
+ factory ParamElement() => document.$dom_createElement("param");
- /// @domName HTMLObjectElement.code; @docsEditable true
- String code;
+ /// @domName HTMLParamElement.name; @docsEditable true
+ String name;
- /// @domName HTMLObjectElement.codeBase; @docsEditable true
- String codeBase;
+ /// @domName HTMLParamElement.type; @docsEditable true
+ String type;
- /// @domName HTMLObjectElement.codeType; @docsEditable true
- String codeType;
+ /// @domName HTMLParamElement.value; @docsEditable true
+ String value;
- /// @domName HTMLObjectElement.data; @docsEditable true
- String data;
+ /// @domName HTMLParamElement.valueType; @docsEditable true
+ String valueType;
+}
+// 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 HTMLObjectElement.declare; @docsEditable true
- bool declare;
- /// @domName HTMLObjectElement.form; @docsEditable true
- final FormElement form;
+/// @domName PeerConnection00; @docsEditable true
+class PeerConnection00 extends EventTarget native "*PeerConnection00" {
- /// @domName HTMLObjectElement.height; @docsEditable true
- String height;
+ ///@docsEditable true
+ factory PeerConnection00(String serverConfiguration, IceCallback iceCallback) => _PeerConnection00FactoryProvider.createPeerConnection00(serverConfiguration, iceCallback);
- /// @domName HTMLObjectElement.hspace; @docsEditable true
- int hspace;
+ /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
+ PeerConnection00Events get on =>
+ new PeerConnection00Events(this);
- /// @domName HTMLObjectElement.name; @docsEditable true
- String name;
+ static const int ACTIVE = 2;
- /// @domName HTMLObjectElement.standby; @docsEditable true
- String standby;
+ static const int CLOSED = 3;
- /// @domName HTMLObjectElement.type; @docsEditable true
- String type;
+ static const int ICE_CHECKING = 0x300;
- /// @domName HTMLObjectElement.useMap; @docsEditable true
- String useMap;
+ static const int ICE_CLOSED = 0x700;
- /// @domName HTMLObjectElement.validationMessage; @docsEditable true
- final String validationMessage;
+ static const int ICE_COMPLETED = 0x500;
- /// @domName HTMLObjectElement.validity; @docsEditable true
- final ValidityState validity;
+ static const int ICE_CONNECTED = 0x400;
- /// @domName HTMLObjectElement.vspace; @docsEditable true
- int vspace;
+ static const int ICE_FAILED = 0x600;
- /// @domName HTMLObjectElement.width; @docsEditable true
- String width;
+ static const int ICE_GATHERING = 0x100;
- /// @domName HTMLObjectElement.willValidate; @docsEditable true
- final bool willValidate;
+ static const int ICE_WAITING = 0x200;
- /// @domName HTMLObjectElement.checkValidity; @docsEditable true
- bool checkValidity() native;
+ static const int NEW = 0;
- /// @domName HTMLObjectElement.setCustomValidity; @docsEditable true
- void setCustomValidity(String error) 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.
+ static const int OPENING = 1;
+ static const int SDP_ANSWER = 0x300;
-/// @domName OESElementIndexUint; @docsEditable true
-class OesElementIndexUint native "*OESElementIndexUint" {
-}
-// 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.
+ static const int SDP_OFFER = 0x100;
+ static const int SDP_PRANSWER = 0x200;
-/// @domName OESStandardDerivatives; @docsEditable true
-class OesStandardDerivatives native "*OESStandardDerivatives" {
+ /// @domName PeerConnection00.iceState; @docsEditable true
+ final int iceState;
- static const int FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
-}
-// 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 PeerConnection00.localDescription; @docsEditable true
+ final SessionDescription localDescription;
+ /// @domName PeerConnection00.localStreams; @docsEditable true
+ @Returns('_MediaStreamList') @Creates('_MediaStreamList')
+ final List<MediaStream> localStreams;
-/// @domName OESTextureFloat; @docsEditable true
-class OesTextureFloat native "*OESTextureFloat" {
-}
-// 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 PeerConnection00.readyState; @docsEditable true
+ final int readyState;
+ /// @domName PeerConnection00.remoteDescription; @docsEditable true
+ final SessionDescription remoteDescription;
-/// @domName OESVertexArrayObject; @docsEditable true
-class OesVertexArrayObject native "*OESVertexArrayObject" {
+ /// @domName PeerConnection00.remoteStreams; @docsEditable true
+ @Returns('_MediaStreamList') @Creates('_MediaStreamList')
+ final List<MediaStream> remoteStreams;
- static const int VERTEX_ARRAY_BINDING_OES = 0x85B5;
+ /// @domName PeerConnection00.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName OESVertexArrayObject.bindVertexArrayOES; @docsEditable true
- @JSName('bindVertexArrayOES')
- void bindVertexArray(WebGLVertexArrayObject arrayObject) native;
-
- /// @domName OESVertexArrayObject.createVertexArrayOES; @docsEditable true
- @JSName('createVertexArrayOES')
- WebGLVertexArrayObject createVertexArray() native;
+ /// @domName PeerConnection00.addStream; @docsEditable true
+ void addStream(MediaStream stream, [Map mediaStreamHints]) {
+ if (?mediaStreamHints) {
+ var mediaStreamHints_1 = convertDartToNative_Dictionary(mediaStreamHints);
+ _addStream_1(stream, mediaStreamHints_1);
+ return;
+ }
+ _addStream_2(stream);
+ return;
+ }
+ @JSName('addStream')
+ void _addStream_1(MediaStream stream, mediaStreamHints) native;
+ @JSName('addStream')
+ void _addStream_2(MediaStream stream) native;
- /// @domName OESVertexArrayObject.deleteVertexArrayOES; @docsEditable true
- @JSName('deleteVertexArrayOES')
- void deleteVertexArray(WebGLVertexArrayObject arrayObject) native;
+ /// @domName PeerConnection00.close; @docsEditable true
+ void close() native;
- /// @domName OESVertexArrayObject.isVertexArrayOES; @docsEditable true
- @JSName('isVertexArrayOES')
- bool isVertexArray(WebGLVertexArrayObject arrayObject) 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 PeerConnection00.createAnswer; @docsEditable true
+ SessionDescription createAnswer(String offer, [Map mediaHints]) {
+ if (?mediaHints) {
+ var mediaHints_1 = convertDartToNative_Dictionary(mediaHints);
+ return _createAnswer_1(offer, mediaHints_1);
+ }
+ return _createAnswer_2(offer);
+ }
+ @JSName('createAnswer')
+ SessionDescription _createAnswer_1(offer, mediaHints) native;
+ @JSName('createAnswer')
+ SessionDescription _createAnswer_2(offer) native;
+ /// @domName PeerConnection00.createOffer; @docsEditable true
+ SessionDescription createOffer([Map mediaHints]) {
+ if (?mediaHints) {
+ var mediaHints_1 = convertDartToNative_Dictionary(mediaHints);
+ return _createOffer_1(mediaHints_1);
+ }
+ return _createOffer_2();
+ }
+ @JSName('createOffer')
+ SessionDescription _createOffer_1(mediaHints) native;
+ @JSName('createOffer')
+ SessionDescription _createOffer_2() native;
-/// @domName HTMLOptGroupElement; @docsEditable true
-class OptGroupElement extends Element native "*HTMLOptGroupElement" {
+ /// @domName PeerConnection00.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event event) native;
- ///@docsEditable true
- factory OptGroupElement() => document.$dom_createElement("optgroup");
+ /// @domName PeerConnection00.processIceMessage; @docsEditable true
+ void processIceMessage(IceCandidate candidate) native;
- /// @domName HTMLOptGroupElement.disabled; @docsEditable true
- bool disabled;
+ /// @domName PeerConnection00.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName HTMLOptGroupElement.label; @docsEditable true
- String label;
-}
-// 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 PeerConnection00.removeStream; @docsEditable true
+ void removeStream(MediaStream stream) native;
+ /// @domName PeerConnection00.setLocalDescription; @docsEditable true
+ void setLocalDescription(int action, SessionDescription desc) native;
-/// @domName HTMLOptionElement; @docsEditable true
-class OptionElement extends Element native "*HTMLOptionElement" {
+ /// @domName PeerConnection00.setRemoteDescription; @docsEditable true
+ void setRemoteDescription(int action, SessionDescription desc) native;
- ///@docsEditable true
- factory OptionElement([String data, String value, bool defaultSelected, bool selected]) {
- if (!?data) {
- return _OptionElementFactoryProvider.createOptionElement();
- }
- if (!?value) {
- return _OptionElementFactoryProvider.createOptionElement(data);
- }
- if (!?defaultSelected) {
- return _OptionElementFactoryProvider.createOptionElement(data, value);
- }
- if (!?selected) {
- return _OptionElementFactoryProvider.createOptionElement(data, value, defaultSelected);
+ /// @domName PeerConnection00.startIce; @docsEditable true
+ void startIce([Map iceOptions]) {
+ if (?iceOptions) {
+ var iceOptions_1 = convertDartToNative_Dictionary(iceOptions);
+ _startIce_1(iceOptions_1);
+ return;
}
- return _OptionElementFactoryProvider.createOptionElement(data, value, defaultSelected, selected);
+ _startIce_2();
+ return;
}
+ @JSName('startIce')
+ void _startIce_1(iceOptions) native;
+ @JSName('startIce')
+ void _startIce_2() native;
+}
- /// @domName HTMLOptionElement.defaultSelected; @docsEditable true
- bool defaultSelected;
-
- /// @domName HTMLOptionElement.disabled; @docsEditable true
- bool disabled;
+/// @docsEditable true
+class PeerConnection00Events extends Events {
+ /// @docsEditable true
+ PeerConnection00Events(EventTarget _ptr) : super(_ptr);
- /// @domName HTMLOptionElement.form; @docsEditable true
- final FormElement form;
+ /// @docsEditable true
+ EventListenerList get addStream => this['addstream'];
- /// @domName HTMLOptionElement.index; @docsEditable true
- final int index;
+ /// @docsEditable true
+ EventListenerList get connecting => this['connecting'];
- /// @domName HTMLOptionElement.label; @docsEditable true
- String label;
+ /// @docsEditable true
+ EventListenerList get open => this['open'];
- /// @domName HTMLOptionElement.selected; @docsEditable true
- bool selected;
+ /// @docsEditable true
+ EventListenerList get removeStream => this['removestream'];
- /// @domName HTMLOptionElement.value; @docsEditable true
- String value;
+ /// @docsEditable true
+ EventListenerList get stateChange => this['statechange'];
}
// 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 HTMLOutputElement; @docsEditable true
-class OutputElement extends Element native "*HTMLOutputElement" {
-
- ///@docsEditable true
- factory OutputElement() => document.$dom_createElement("output");
+/// @domName Performance; @docsEditable true
+class Performance extends EventTarget native "*Performance" {
- /// @domName HTMLOutputElement.defaultValue; @docsEditable true
- String defaultValue;
+ /// @domName Performance.memory; @docsEditable true
+ final MemoryInfo memory;
- /// @domName HTMLOutputElement.form; @docsEditable true
- final FormElement form;
+ /// @domName Performance.navigation; @docsEditable true
+ final PerformanceNavigation navigation;
- /// @domName HTMLOutputElement.htmlFor; @docsEditable true
- DomSettableTokenList htmlFor;
+ /// @domName Performance.timing; @docsEditable true
+ final PerformanceTiming timing;
- /// @domName HTMLOutputElement.labels; @docsEditable true
- @Returns('NodeList') @Creates('NodeList')
- final List<Node> labels;
+ /// @domName Performance.now; @docsEditable true
+ num now() 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 HTMLOutputElement.name; @docsEditable true
- String name;
- /// @domName HTMLOutputElement.type; @docsEditable true
- final String type;
+/// @domName PerformanceNavigation; @docsEditable true
+class PerformanceNavigation native "*PerformanceNavigation" {
- /// @domName HTMLOutputElement.validationMessage; @docsEditable true
- final String validationMessage;
+ static const int TYPE_BACK_FORWARD = 2;
- /// @domName HTMLOutputElement.validity; @docsEditable true
- final ValidityState validity;
+ static const int TYPE_NAVIGATE = 0;
- /// @domName HTMLOutputElement.value; @docsEditable true
- String value;
+ static const int TYPE_RELOAD = 1;
- /// @domName HTMLOutputElement.willValidate; @docsEditable true
- final bool willValidate;
+ static const int TYPE_RESERVED = 255;
- /// @domName HTMLOutputElement.checkValidity; @docsEditable true
- bool checkValidity() native;
+ /// @domName PerformanceNavigation.redirectCount; @docsEditable true
+ final int redirectCount;
- /// @domName HTMLOutputElement.setCustomValidity; @docsEditable true
- void setCustomValidity(String error) native;
+ /// @domName PerformanceNavigation.type; @docsEditable true
+ final int type;
}
// 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 OverflowEvent; @docsEditable true
-class OverflowEvent extends Event native "*OverflowEvent" {
-
- static const int BOTH = 2;
+/// @domName PerformanceTiming; @docsEditable true
+class PerformanceTiming native "*PerformanceTiming" {
- static const int HORIZONTAL = 0;
+ /// @domName PerformanceTiming.connectEnd; @docsEditable true
+ final int connectEnd;
- static const int VERTICAL = 1;
+ /// @domName PerformanceTiming.connectStart; @docsEditable true
+ final int connectStart;
- /// @domName OverflowEvent.horizontalOverflow; @docsEditable true
- final bool horizontalOverflow;
+ /// @domName PerformanceTiming.domComplete; @docsEditable true
+ final int domComplete;
- /// @domName OverflowEvent.orient; @docsEditable true
- final int orient;
+ /// @domName PerformanceTiming.domContentLoadedEventEnd; @docsEditable true
+ final int domContentLoadedEventEnd;
- /// @domName OverflowEvent.verticalOverflow; @docsEditable true
- final bool verticalOverflow;
-}
-// 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 PerformanceTiming.domContentLoadedEventStart; @docsEditable true
+ final int domContentLoadedEventStart;
+ /// @domName PerformanceTiming.domInteractive; @docsEditable true
+ final int domInteractive;
-/// @domName PagePopupController; @docsEditable true
-class PagePopupController native "*PagePopupController" {
+ /// @domName PerformanceTiming.domLoading; @docsEditable true
+ final int domLoading;
- /// @domName PagePopupController.localizeNumberString; @docsEditable true
- String localizeNumberString(String numberString) native;
+ /// @domName PerformanceTiming.domainLookupEnd; @docsEditable true
+ final int domainLookupEnd;
- /// @domName PagePopupController.setValueAndClosePopup; @docsEditable true
- void setValueAndClosePopup(int numberValue, String stringValue) 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 PerformanceTiming.domainLookupStart; @docsEditable true
+ final int domainLookupStart;
+ /// @domName PerformanceTiming.fetchStart; @docsEditable true
+ final int fetchStart;
-/// @domName PageTransitionEvent; @docsEditable true
-class PageTransitionEvent extends Event native "*PageTransitionEvent" {
+ /// @domName PerformanceTiming.loadEventEnd; @docsEditable true
+ final int loadEventEnd;
- /// @domName PageTransitionEvent.persisted; @docsEditable true
- final bool persisted;
-}
-// 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 PerformanceTiming.loadEventStart; @docsEditable true
+ final int loadEventStart;
+ /// @domName PerformanceTiming.navigationStart; @docsEditable true
+ final int navigationStart;
-/// @domName HTMLParagraphElement; @docsEditable true
-class ParagraphElement extends Element native "*HTMLParagraphElement" {
+ /// @domName PerformanceTiming.redirectEnd; @docsEditable true
+ final int redirectEnd;
- ///@docsEditable true
- factory ParagraphElement() => document.$dom_createElement("p");
+ /// @domName PerformanceTiming.redirectStart; @docsEditable true
+ final int redirectStart;
- /// @domName HTMLParagraphElement.align; @docsEditable true
- String align;
+ /// @domName PerformanceTiming.requestStart; @docsEditable true
+ final int requestStart;
+
+ /// @domName PerformanceTiming.responseEnd; @docsEditable true
+ final int responseEnd;
+
+ /// @domName PerformanceTiming.responseStart; @docsEditable true
+ final int responseStart;
+
+ /// @domName PerformanceTiming.secureConnectionStart; @docsEditable true
+ final int secureConnectionStart;
+
+ /// @domName PerformanceTiming.unloadEventEnd; @docsEditable true
+ final int unloadEventEnd;
+
+ /// @domName PerformanceTiming.unloadEventStart; @docsEditable true
+ final int unloadEventStart;
}
// 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.
-/// @domName HTMLParamElement; @docsEditable true
-class ParamElement extends Element native "*HTMLParamElement" {
-
- ///@docsEditable true
- factory ParamElement() => document.$dom_createElement("param");
- /// @domName HTMLParamElement.name; @docsEditable true
- String name;
+/// @domName WebKitPoint
+class Point native "*WebKitPoint" {
+ factory Point(num x, num y) => _PointFactoryProvider.createPoint(x, y);
- /// @domName HTMLParamElement.type; @docsEditable true
- String type;
+ /// @domName WebKitPoint.x; @docsEditable true
+ num x;
- /// @domName HTMLParamElement.value; @docsEditable true
- String value;
+ /// @domName WebKitPoint.y; @docsEditable true
+ num y;
- /// @domName HTMLParamElement.valueType; @docsEditable true
- String valueType;
}
// 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 PeerConnection00; @docsEditable true
-class PeerConnection00 extends EventTarget native "*PeerConnection00" {
-
- ///@docsEditable true
- factory PeerConnection00(String serverConfiguration, IceCallback iceCallback) => _PeerConnection00FactoryProvider.createPeerConnection00(serverConfiguration, iceCallback);
-
- /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
- PeerConnection00Events get on =>
- new PeerConnection00Events(this);
-
- static const int ACTIVE = 2;
+/// @domName PopStateEvent; @docsEditable true
+class PopStateEvent extends Event native "*PopStateEvent" {
- static const int CLOSED = 3;
+ /// @domName PopStateEvent.state; @docsEditable true
+ dynamic get state => convertNativeToDart_SerializedScriptValue(this._state);
+ @JSName('state')
+ @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
+ final dynamic _state;
+}
+// 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.
- static const int ICE_CHECKING = 0x300;
+// WARNING: Do not edit - generated code.
- static const int ICE_CLOSED = 0x700;
- static const int ICE_COMPLETED = 0x500;
+typedef void PositionCallback(Geoposition position);
+// 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.
- static const int ICE_CONNECTED = 0x400;
- static const int ICE_FAILED = 0x600;
+/// @domName PositionError; @docsEditable true
+class PositionError native "*PositionError" {
- static const int ICE_GATHERING = 0x100;
+ static const int PERMISSION_DENIED = 1;
- static const int ICE_WAITING = 0x200;
+ static const int POSITION_UNAVAILABLE = 2;
- static const int NEW = 0;
+ static const int TIMEOUT = 3;
- static const int OPENING = 1;
+ /// @domName PositionError.code; @docsEditable true
+ final int code;
- static const int SDP_ANSWER = 0x300;
+ /// @domName PositionError.message; @docsEditable true
+ 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.
- static const int SDP_OFFER = 0x100;
+// WARNING: Do not edit - generated code.
- static const int SDP_PRANSWER = 0x200;
- /// @domName PeerConnection00.iceState; @docsEditable true
- final int iceState;
+typedef void PositionErrorCallback(PositionError 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.
- /// @domName PeerConnection00.localDescription; @docsEditable true
- final SessionDescription localDescription;
- /// @domName PeerConnection00.localStreams; @docsEditable true
- @Returns('_MediaStreamList') @Creates('_MediaStreamList')
- final List<MediaStream> localStreams;
+/// @domName HTMLPreElement; @docsEditable true
+class PreElement extends Element native "*HTMLPreElement" {
- /// @domName PeerConnection00.readyState; @docsEditable true
- final int readyState;
+ ///@docsEditable true
+ factory PreElement() => document.$dom_createElement("pre");
- /// @domName PeerConnection00.remoteDescription; @docsEditable true
- final SessionDescription remoteDescription;
+ /// @domName HTMLPreElement.width; @docsEditable true
+ int width;
- /// @domName PeerConnection00.remoteStreams; @docsEditable true
- @Returns('_MediaStreamList') @Creates('_MediaStreamList')
- final List<MediaStream> remoteStreams;
+ /// @domName HTMLPreElement.wrap; @docsEditable true
+ bool wrap;
+}
+// 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 PeerConnection00.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName PeerConnection00.addStream; @docsEditable true
- void addStream(MediaStream stream, [Map mediaStreamHints]) {
- if (?mediaStreamHints) {
- var mediaStreamHints_1 = convertDartToNative_Dictionary(mediaStreamHints);
- _addStream_1(stream, mediaStreamHints_1);
- return;
- }
- _addStream_2(stream);
- return;
- }
- @JSName('addStream')
- void _addStream_1(MediaStream stream, mediaStreamHints) native;
- @JSName('addStream')
- void _addStream_2(MediaStream stream) native;
+/// @domName ProcessingInstruction; @docsEditable true
+class ProcessingInstruction extends Node native "*ProcessingInstruction" {
- /// @domName PeerConnection00.close; @docsEditable true
- void close() native;
+ /// @domName ProcessingInstruction.data; @docsEditable true
+ String data;
- /// @domName PeerConnection00.createAnswer; @docsEditable true
- SessionDescription createAnswer(String offer, [Map mediaHints]) {
- if (?mediaHints) {
- var mediaHints_1 = convertDartToNative_Dictionary(mediaHints);
- return _createAnswer_1(offer, mediaHints_1);
- }
- return _createAnswer_2(offer);
- }
- @JSName('createAnswer')
- SessionDescription _createAnswer_1(offer, mediaHints) native;
- @JSName('createAnswer')
- SessionDescription _createAnswer_2(offer) native;
+ /// @domName ProcessingInstruction.sheet; @docsEditable true
+ final StyleSheet sheet;
- /// @domName PeerConnection00.createOffer; @docsEditable true
- SessionDescription createOffer([Map mediaHints]) {
- if (?mediaHints) {
- var mediaHints_1 = convertDartToNative_Dictionary(mediaHints);
- return _createOffer_1(mediaHints_1);
- }
- return _createOffer_2();
- }
- @JSName('createOffer')
- SessionDescription _createOffer_1(mediaHints) native;
- @JSName('createOffer')
- SessionDescription _createOffer_2() native;
+ /// @domName ProcessingInstruction.target; @docsEditable true
+ final String target;
+}
+// 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 PeerConnection00.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
- /// @domName PeerConnection00.processIceMessage; @docsEditable true
- void processIceMessage(IceCandidate candidate) native;
+/// @domName HTMLProgressElement; @docsEditable true
+class ProgressElement extends Element native "*HTMLProgressElement" {
- /// @domName PeerConnection00.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ ///@docsEditable true
+ factory ProgressElement() => document.$dom_createElement("progress");
- /// @domName PeerConnection00.removeStream; @docsEditable true
- void removeStream(MediaStream stream) native;
+ /// @domName HTMLProgressElement.labels; @docsEditable true
+ @Returns('NodeList') @Creates('NodeList')
+ final List<Node> labels;
- /// @domName PeerConnection00.setLocalDescription; @docsEditable true
- void setLocalDescription(int action, SessionDescription desc) native;
+ /// @domName HTMLProgressElement.max; @docsEditable true
+ num max;
- /// @domName PeerConnection00.setRemoteDescription; @docsEditable true
- void setRemoteDescription(int action, SessionDescription desc) native;
+ /// @domName HTMLProgressElement.position; @docsEditable true
+ final num position;
- /// @domName PeerConnection00.startIce; @docsEditable true
- void startIce([Map iceOptions]) {
- if (?iceOptions) {
- var iceOptions_1 = convertDartToNative_Dictionary(iceOptions);
- _startIce_1(iceOptions_1);
- return;
- }
- _startIce_2();
- return;
- }
- @JSName('startIce')
- void _startIce_1(iceOptions) native;
- @JSName('startIce')
- void _startIce_2() native;
+ /// @domName HTMLProgressElement.value; @docsEditable true
+ num value;
}
+// 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 true
-class PeerConnection00Events extends Events {
- /// @docsEditable true
- PeerConnection00Events(EventTarget _ptr) : super(_ptr);
-
- /// @docsEditable true
- EventListenerList get addStream => this['addstream'];
- /// @docsEditable true
- EventListenerList get connecting => this['connecting'];
+/// @domName ProgressEvent; @docsEditable true
+class ProgressEvent extends Event native "*ProgressEvent" {
- /// @docsEditable true
- EventListenerList get open => this['open'];
+ /// @domName ProgressEvent.lengthComputable; @docsEditable true
+ final bool lengthComputable;
- /// @docsEditable true
- EventListenerList get removeStream => this['removestream'];
+ /// @domName ProgressEvent.loaded; @docsEditable true
+ final int loaded;
- /// @docsEditable true
- EventListenerList get stateChange => this['statechange'];
-}
-// 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 Performance; @docsEditable true
-class Performance extends EventTarget native "*Performance" {
-
- /// @domName Performance.memory; @docsEditable true
- final MemoryInfo memory;
-
- /// @domName Performance.navigation; @docsEditable true
- final PerformanceNavigation navigation;
-
- /// @domName Performance.timing; @docsEditable true
- final PerformanceTiming timing;
-
- /// @domName Performance.now; @docsEditable true
- num now() 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 PerformanceNavigation; @docsEditable true
-class PerformanceNavigation native "*PerformanceNavigation" {
-
- static const int TYPE_BACK_FORWARD = 2;
-
- static const int TYPE_NAVIGATE = 0;
-
- static const int TYPE_RELOAD = 1;
-
- static const int TYPE_RESERVED = 255;
-
- /// @domName PerformanceNavigation.redirectCount; @docsEditable true
- final int redirectCount;
-
- /// @domName PerformanceNavigation.type; @docsEditable true
- final int type;
-}
-// 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 PerformanceTiming; @docsEditable true
-class PerformanceTiming native "*PerformanceTiming" {
-
- /// @domName PerformanceTiming.connectEnd; @docsEditable true
- final int connectEnd;
-
- /// @domName PerformanceTiming.connectStart; @docsEditable true
- final int connectStart;
-
- /// @domName PerformanceTiming.domComplete; @docsEditable true
- final int domComplete;
-
- /// @domName PerformanceTiming.domContentLoadedEventEnd; @docsEditable true
- final int domContentLoadedEventEnd;
-
- /// @domName PerformanceTiming.domContentLoadedEventStart; @docsEditable true
- final int domContentLoadedEventStart;
-
- /// @domName PerformanceTiming.domInteractive; @docsEditable true
- final int domInteractive;
-
- /// @domName PerformanceTiming.domLoading; @docsEditable true
- final int domLoading;
-
- /// @domName PerformanceTiming.domainLookupEnd; @docsEditable true
- final int domainLookupEnd;
-
- /// @domName PerformanceTiming.domainLookupStart; @docsEditable true
- final int domainLookupStart;
-
- /// @domName PerformanceTiming.fetchStart; @docsEditable true
- final int fetchStart;
-
- /// @domName PerformanceTiming.loadEventEnd; @docsEditable true
- final int loadEventEnd;
-
- /// @domName PerformanceTiming.loadEventStart; @docsEditable true
- final int loadEventStart;
-
- /// @domName PerformanceTiming.navigationStart; @docsEditable true
- final int navigationStart;
-
- /// @domName PerformanceTiming.redirectEnd; @docsEditable true
- final int redirectEnd;
-
- /// @domName PerformanceTiming.redirectStart; @docsEditable true
- final int redirectStart;
-
- /// @domName PerformanceTiming.requestStart; @docsEditable true
- final int requestStart;
-
- /// @domName PerformanceTiming.responseEnd; @docsEditable true
- final int responseEnd;
-
- /// @domName PerformanceTiming.responseStart; @docsEditable true
- final int responseStart;
-
- /// @domName PerformanceTiming.secureConnectionStart; @docsEditable true
- final int secureConnectionStart;
-
- /// @domName PerformanceTiming.unloadEventEnd; @docsEditable true
- final int unloadEventEnd;
-
- /// @domName PerformanceTiming.unloadEventStart; @docsEditable true
- final int unloadEventStart;
-}
-// 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.
-
-
-/// @domName WebKitPoint
-class Point native "*WebKitPoint" {
- factory Point(num x, num y) => _PointFactoryProvider.createPoint(x, y);
-
- /// @domName WebKitPoint.x; @docsEditable true
- num x;
-
- /// @domName WebKitPoint.y; @docsEditable true
- num y;
-
-}
-// 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 PopStateEvent; @docsEditable true
-class PopStateEvent extends Event native "*PopStateEvent" {
-
- /// @domName PopStateEvent.state; @docsEditable true
- dynamic get state => convertNativeToDart_SerializedScriptValue(this._state);
- @JSName('state')
- @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
- final dynamic _state;
-}
-// 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 PositionCallback(Geoposition position);
-// 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 PositionError; @docsEditable true
-class PositionError native "*PositionError" {
-
- static const int PERMISSION_DENIED = 1;
-
- static const int POSITION_UNAVAILABLE = 2;
-
- static const int TIMEOUT = 3;
-
- /// @domName PositionError.code; @docsEditable true
- final int code;
-
- /// @domName PositionError.message; @docsEditable true
- 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.
-
-// WARNING: Do not edit - generated code.
-
-
-typedef void PositionErrorCallback(PositionError 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.
-
-
-/// @domName HTMLPreElement; @docsEditable true
-class PreElement extends Element native "*HTMLPreElement" {
-
- ///@docsEditable true
- factory PreElement() => document.$dom_createElement("pre");
-
- /// @domName HTMLPreElement.width; @docsEditable true
- int width;
-
- /// @domName HTMLPreElement.wrap; @docsEditable true
- bool wrap;
-}
-// 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 ProcessingInstruction; @docsEditable true
-class ProcessingInstruction extends Node native "*ProcessingInstruction" {
-
- /// @domName ProcessingInstruction.data; @docsEditable true
- String data;
-
- /// @domName ProcessingInstruction.sheet; @docsEditable true
- final StyleSheet sheet;
-
- /// @domName ProcessingInstruction.target; @docsEditable true
- final String target;
-}
-// 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 HTMLProgressElement; @docsEditable true
-class ProgressElement extends Element native "*HTMLProgressElement" {
-
- ///@docsEditable true
- factory ProgressElement() => document.$dom_createElement("progress");
-
- /// @domName HTMLProgressElement.labels; @docsEditable true
- @Returns('NodeList') @Creates('NodeList')
- final List<Node> labels;
-
- /// @domName HTMLProgressElement.max; @docsEditable true
- num max;
-
- /// @domName HTMLProgressElement.position; @docsEditable true
- final num position;
-
- /// @domName HTMLProgressElement.value; @docsEditable true
- num value;
-}
-// 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 ProgressEvent; @docsEditable true
-class ProgressEvent extends Event native "*ProgressEvent" {
-
- /// @domName ProgressEvent.lengthComputable; @docsEditable true
- final bool lengthComputable;
-
- /// @domName ProgressEvent.loaded; @docsEditable true
- final int loaded;
-
- /// @domName ProgressEvent.total; @docsEditable true
- final int total;
+ /// @domName ProgressEvent.total; @docsEditable true
+ final int total;
}
// 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
@@ -17957,7 +17296,7 @@ class TextEvent extends UIEvent native "*TextEvent" {
final String data;
/// @domName TextEvent.initTextEvent; @docsEditable true
- void initTextEvent(String typeArg, bool canBubbleArg, bool cancelableArg, LocalWindow viewArg, String dataArg) native;
+ void initTextEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) 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
@@ -18475,7 +17814,7 @@ class TouchEvent extends UIEvent native "*TouchEvent" {
final TouchList touches;
/// @domName TouchEvent.initTouchEvent; @docsEditable true
- void initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, LocalWindow view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native;
+ void initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, Window view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) 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
@@ -18747,9 +18086,9 @@ class UIEvent extends Event native "*UIEvent" {
final int pageY;
/// @domName UIEvent.view; @docsEditable true
- Window get view => _convertNativeToDart_Window(this._view);
+ WindowBase get view => _convertNativeToDart_Window(this._view);
@JSName('view')
- @Creates('LocalWindow|=Object') @Returns('LocalWindow|=Object')
+ @Creates('Window|=Object') @Returns('Window|=Object')
final dynamic _view;
/// @domName UIEvent.which; @docsEditable true
@@ -18757,7 +18096,7 @@ class UIEvent extends Event native "*UIEvent" {
/// @domName UIEvent.initUIEvent; @docsEditable true
@JSName('initUIEvent')
- void $dom_initUIEvent(String type, bool canBubble, bool cancelable, LocalWindow view, int detail) native;
+ void $dom_initUIEvent(String type, bool canBubble, bool cancelable, Window view, int detail) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -20458,393 +19797,1056 @@ class WebGLRenderingContext extends CanvasRenderingContext native "*WebGLRenderi
@JSName('texSubImage2D')
void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElement video) native;
- /// @domName WebGLRenderingContext.uniform1f; @docsEditable true
- void uniform1f(WebGLUniformLocation location, num x) native;
+ /// @domName WebGLRenderingContext.uniform1f; @docsEditable true
+ void uniform1f(WebGLUniformLocation location, num x) native;
+
+ /// @domName WebGLRenderingContext.uniform1fv; @docsEditable true
+ void uniform1fv(WebGLUniformLocation location, Float32Array v) native;
+
+ /// @domName WebGLRenderingContext.uniform1i; @docsEditable true
+ void uniform1i(WebGLUniformLocation location, int x) native;
+
+ /// @domName WebGLRenderingContext.uniform1iv; @docsEditable true
+ void uniform1iv(WebGLUniformLocation location, Int32Array v) native;
+
+ /// @domName WebGLRenderingContext.uniform2f; @docsEditable true
+ void uniform2f(WebGLUniformLocation location, num x, num y) native;
+
+ /// @domName WebGLRenderingContext.uniform2fv; @docsEditable true
+ void uniform2fv(WebGLUniformLocation location, Float32Array v) native;
+
+ /// @domName WebGLRenderingContext.uniform2i; @docsEditable true
+ void uniform2i(WebGLUniformLocation location, int x, int y) native;
+
+ /// @domName WebGLRenderingContext.uniform2iv; @docsEditable true
+ void uniform2iv(WebGLUniformLocation location, Int32Array v) native;
+
+ /// @domName WebGLRenderingContext.uniform3f; @docsEditable true
+ void uniform3f(WebGLUniformLocation location, num x, num y, num z) native;
+
+ /// @domName WebGLRenderingContext.uniform3fv; @docsEditable true
+ void uniform3fv(WebGLUniformLocation location, Float32Array v) native;
+
+ /// @domName WebGLRenderingContext.uniform3i; @docsEditable true
+ void uniform3i(WebGLUniformLocation location, int x, int y, int z) native;
+
+ /// @domName WebGLRenderingContext.uniform3iv; @docsEditable true
+ void uniform3iv(WebGLUniformLocation location, Int32Array v) native;
+
+ /// @domName WebGLRenderingContext.uniform4f; @docsEditable true
+ void uniform4f(WebGLUniformLocation location, num x, num y, num z, num w) native;
+
+ /// @domName WebGLRenderingContext.uniform4fv; @docsEditable true
+ void uniform4fv(WebGLUniformLocation location, Float32Array v) native;
+
+ /// @domName WebGLRenderingContext.uniform4i; @docsEditable true
+ void uniform4i(WebGLUniformLocation location, int x, int y, int z, int w) native;
+
+ /// @domName WebGLRenderingContext.uniform4iv; @docsEditable true
+ void uniform4iv(WebGLUniformLocation location, Int32Array v) native;
+
+ /// @domName WebGLRenderingContext.uniformMatrix2fv; @docsEditable true
+ void uniformMatrix2fv(WebGLUniformLocation location, bool transpose, Float32Array array) native;
+
+ /// @domName WebGLRenderingContext.uniformMatrix3fv; @docsEditable true
+ void uniformMatrix3fv(WebGLUniformLocation location, bool transpose, Float32Array array) native;
+
+ /// @domName WebGLRenderingContext.uniformMatrix4fv; @docsEditable true
+ void uniformMatrix4fv(WebGLUniformLocation location, bool transpose, Float32Array array) native;
+
+ /// @domName WebGLRenderingContext.useProgram; @docsEditable true
+ void useProgram(WebGLProgram program) native;
+
+ /// @domName WebGLRenderingContext.validateProgram; @docsEditable true
+ void validateProgram(WebGLProgram program) native;
+
+ /// @domName WebGLRenderingContext.vertexAttrib1f; @docsEditable true
+ void vertexAttrib1f(int indx, num x) native;
+
+ /// @domName WebGLRenderingContext.vertexAttrib1fv; @docsEditable true
+ void vertexAttrib1fv(int indx, Float32Array values) native;
+
+ /// @domName WebGLRenderingContext.vertexAttrib2f; @docsEditable true
+ void vertexAttrib2f(int indx, num x, num y) native;
+
+ /// @domName WebGLRenderingContext.vertexAttrib2fv; @docsEditable true
+ void vertexAttrib2fv(int indx, Float32Array values) native;
+
+ /// @domName WebGLRenderingContext.vertexAttrib3f; @docsEditable true
+ void vertexAttrib3f(int indx, num x, num y, num z) native;
+
+ /// @domName WebGLRenderingContext.vertexAttrib3fv; @docsEditable true
+ void vertexAttrib3fv(int indx, Float32Array values) native;
+
+ /// @domName WebGLRenderingContext.vertexAttrib4f; @docsEditable true
+ void vertexAttrib4f(int indx, num x, num y, num z, num w) native;
+
+ /// @domName WebGLRenderingContext.vertexAttrib4fv; @docsEditable true
+ void vertexAttrib4fv(int indx, Float32Array values) native;
+
+ /// @domName WebGLRenderingContext.vertexAttribPointer; @docsEditable true
+ void vertexAttribPointer(int indx, int size, int type, bool normalized, int stride, int offset) native;
+
+ /// @domName WebGLRenderingContext.viewport; @docsEditable true
+ void viewport(int x, int y, int width, int height) 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 WebGLShader; @docsEditable true
+class WebGLShader native "*WebGLShader" {
+}
+// 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 WebGLShaderPrecisionFormat; @docsEditable true
+class WebGLShaderPrecisionFormat native "*WebGLShaderPrecisionFormat" {
+
+ /// @domName WebGLShaderPrecisionFormat.precision; @docsEditable true
+ final int precision;
+
+ /// @domName WebGLShaderPrecisionFormat.rangeMax; @docsEditable true
+ final int rangeMax;
+
+ /// @domName WebGLShaderPrecisionFormat.rangeMin; @docsEditable true
+ final int rangeMin;
+}
+// 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 WebGLTexture; @docsEditable true
+class WebGLTexture native "*WebGLTexture" {
+}
+// 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 WebGLUniformLocation; @docsEditable true
+class WebGLUniformLocation native "*WebGLUniformLocation" {
+}
+// 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 WebGLVertexArrayObjectOES; @docsEditable true
+class WebGLVertexArrayObject native "*WebGLVertexArrayObjectOES" {
+}
+// 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 WebKitCSSFilterValue; @docsEditable true
+class WebKitCssFilterValue extends _CssValueList native "*WebKitCSSFilterValue" {
+
+ static const int CSS_FILTER_BLUR = 10;
+
+ static const int CSS_FILTER_BRIGHTNESS = 8;
+
+ static const int CSS_FILTER_CONTRAST = 9;
+
+ static const int CSS_FILTER_CUSTOM = 12;
+
+ static const int CSS_FILTER_DROP_SHADOW = 11;
+
+ static const int CSS_FILTER_GRAYSCALE = 2;
+
+ static const int CSS_FILTER_HUE_ROTATE = 5;
+
+ static const int CSS_FILTER_INVERT = 6;
+
+ static const int CSS_FILTER_OPACITY = 7;
+
+ static const int CSS_FILTER_REFERENCE = 1;
+
+ static const int CSS_FILTER_SATURATE = 4;
+
+ static const int CSS_FILTER_SEPIA = 3;
+
+ /// @domName WebKitCSSFilterValue.operationType; @docsEditable true
+ final int operationType;
+}
+// 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 WebKitNamedFlow; @docsEditable true
+class WebKitNamedFlow extends EventTarget native "*WebKitNamedFlow" {
+
+ /// @domName WebKitNamedFlow.firstEmptyRegionIndex; @docsEditable true
+ final int firstEmptyRegionIndex;
+
+ /// @domName WebKitNamedFlow.name; @docsEditable true
+ final String name;
+
+ /// @domName WebKitNamedFlow.overset; @docsEditable true
+ final bool overset;
+
+ /// @domName WebKitNamedFlow.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+
+ /// @domName WebKitNamedFlow.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event event) native;
+
+ /// @domName WebKitNamedFlow.getContent; @docsEditable true
+ @Returns('NodeList') @Creates('NodeList')
+ List<Node> getContent() native;
+
+ /// @domName WebKitNamedFlow.getRegions; @docsEditable true
+ @Returns('NodeList') @Creates('NodeList')
+ List<Node> getRegions() native;
+
+ /// @domName WebKitNamedFlow.getRegionsByContent; @docsEditable true
+ @Returns('NodeList') @Creates('NodeList')
+ List<Node> getRegionsByContent(Node contentNode) native;
+
+ /// @domName WebKitNamedFlow.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ 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.
+
+// WARNING: Do not edit - generated code.
+
+
+/// @domName WebSocket
+class WebSocket extends EventTarget native "*WebSocket" {
+ factory WebSocket(String url) => _WebSocketFactoryProvider.createWebSocket(url);
+
+ /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
+ WebSocketEvents get on =>
+ new WebSocketEvents(this);
+
+ static const int CLOSED = 3;
+
+ static const int CLOSING = 2;
+
+ static const int CONNECTING = 0;
+
+ static const int OPEN = 1;
+
+ /// @domName WebSocket.URL; @docsEditable true
+ @JSName('URL')
+ final String Url;
+
+ /// @domName WebSocket.binaryType; @docsEditable true
+ String binaryType;
+
+ /// @domName WebSocket.bufferedAmount; @docsEditable true
+ final int bufferedAmount;
+
+ /// @domName WebSocket.extensions; @docsEditable true
+ final String extensions;
+
+ /// @domName WebSocket.protocol; @docsEditable true
+ final String protocol;
+
+ /// @domName WebSocket.readyState; @docsEditable true
+ final int readyState;
+
+ /// @domName WebSocket.url; @docsEditable true
+ final String url;
+
+ /// @domName WebSocket.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+
+ /// @domName WebSocket.close; @docsEditable true
+ void close([int code, String reason]) native;
+
+ /// @domName WebSocket.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event evt) native;
+
+ /// @domName WebSocket.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+
+ /// @domName WebSocket.send; @docsEditable true
+ void send(data) native;
+
+}
+
+/// @docsEditable true
+class WebSocketEvents extends Events {
+ /// @docsEditable true
+ WebSocketEvents(EventTarget _ptr) : super(_ptr);
+
+ /// @docsEditable true
+ EventListenerList get close => this['close'];
+
+ /// @docsEditable true
+ EventListenerList get error => this['error'];
+
+ /// @docsEditable true
+ EventListenerList get message => this['message'];
+
+ /// @docsEditable true
+ EventListenerList get open => this['open'];
+}
+// 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 WheelEvent
+class WheelEvent extends MouseEvent native "*WheelEvent" {
+
+ /// @domName WheelEvent.webkitDirectionInvertedFromDevice; @docsEditable true
+ final bool webkitDirectionInvertedFromDevice;
+
+ /// @domName WheelEvent.initWebKitWheelEvent; @docsEditable true
+ void initWebKitWheelEvent(int wheelDeltaX, int wheelDeltaY, Window view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native;
+
+
+ /** @domName WheelEvent.deltaY */
+ num get deltaY {
+ if (JS('bool', '#.deltaY !== undefined', this)) {
+ // W3C WheelEvent
+ return this._deltaY;
+ } else if (JS('bool', '#.wheelDelta !== undefined', this)) {
+ // Chrome and IE
+ return this._wheelDelta;
+ } else if (JS('bool', '#.detail !== undefined', this)) {
+ // Firefox
+
+ // Handle DOMMouseScroll case where it uses detail and the axis to
+ // differentiate.
+ if (JS('bool', '#.axis == MouseScrollEvent.VERTICAL_AXIS', this)) {
+ var detail = this._detail;
+ // Firefox is normally the number of lines to scale (normally 3)
+ // so multiply it by 40 to get pixels to move, matching IE & WebKit.
+ if (detail < 100) {
+ return detail * 40;
+ }
+ return detail;
+ }
+ return 0;
+ }
+ throw new UnsupportedError(
+ 'deltaY is not supported');
+ }
+
+ /** @domName WheelEvent.deltaX */
+ num get deltaX {
+ if (JS('bool', '#.deltaX !== undefined', this)) {
+ // W3C WheelEvent
+ return this._deltaX;
+ } else if (JS('bool', '#.wheelDeltaX !== undefined', this)) {
+ // Chrome
+ return this._wheelDeltaX;
+ } else if (JS('bool', '#.detail !== undefined', this)) {
+ // Firefox and IE.
+ // IE will have detail set but will not set axis.
+
+ // Handle DOMMouseScroll case where it uses detail and the axis to
+ // differentiate.
+ if (JS('bool', '#.axis !== undefined && #.axis == MouseScrollEvent.HORIZONTAL_AXIS', this, this)) {
+ var detail = this._detail;
+ // Firefox is normally the number of lines to scale (normally 3)
+ // so multiply it by 40 to get pixels to move, matching IE & WebKit.
+ if (detail < 100) {
+ return detail * 40;
+ }
+ return detail;
+ }
+ return 0;
+ }
+ throw new UnsupportedError(
+ 'deltaX is not supported');
+ }
+
+ int get deltaMode {
+ if (JS('bool', '!!#.deltaMode', this)) {
+ // If not available then we're poly-filling and doing pixel scroll.
+ return 0;
+ }
+ return this._deltaMode;
+ }
+
+ num get _deltaY => JS('num', '#.deltaY', this);
+ num get _deltaX => JS('num', '#.deltaX', this);
+ num get _wheelDelta => JS('num', '#.wheelDelta', this);
+ num get _wheelDeltaX => JS('num', '#.wheelDeltaX', this);
+ num get _detail => JS('num', '#.detail', this);
+ int get _deltaMode => JS('int', '#.deltaMode', this);
+
+}
+// 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 Window
+class Window extends EventTarget implements WindowBase native "@*DOMWindow" {
+
+ Document get document => JS('Document', '#.document', this);
+
+ WindowBase _open2(url, name) => JS('Window', '#.open(#,#)', this, url, name);
+
+ WindowBase _open3(url, name, options) =>
+ JS('Window', '#.open(#,#,#)', this, url, name, options);
+
+ WindowBase open(String url, String name, [String options]) {
+ if (options == null) {
+ return _DOMWindowCrossFrame._createSafe(_open2(url, name));
+ } else {
+ return _DOMWindowCrossFrame._createSafe(_open3(url, name, options));
+ }
+ }
+
+ // API level getter and setter for Location.
+ // TODO: The cross domain safe wrapper can be inserted here or folded into
+ // _LocationWrapper.
+ Location get location {
+ // Firefox work-around for Location. The Firefox location object cannot be
+ // made to behave like a Dart object so must be wrapped.
+ var result = _location;
+ if (_isDartLocation(result)) return result; // e.g. on Chrome.
+ if (null == _location_wrapper) {
+ _location_wrapper = new _LocationWrapper(result);
+ }
+ return _location_wrapper;
+ }
+
+ // TODO: consider forcing users to do: window.location.assign('string').
+ /**
+ * Sets the window's location, which causes the browser to navigate to the new
+ * location. [value] may be a Location object or a string.
+ */
+ void set location(value) {
+ if (value is _LocationWrapper) {
+ _location = value._ptr;
+ } else {
+ _location = value;
+ }
+ }
+
+ _LocationWrapper _location_wrapper; // Cached wrapped Location object.
+
+ // Native getter and setter to access raw Location object.
+ dynamic get _location => JS('Location|=Object', '#.location', this);
+ void set _location(value) {
+ JS('void', '#.location = #', this, value);
+ }
+ // Prevent compiled from thinking 'location' property is available for a Dart
+ // member.
+ @JSName('location')
+ _protect_location() native;
+
+ static _isDartLocation(thing) {
+ // On Firefox the code that implements 'is Location' fails to find the patch
+ // stub on Object.prototype and throws an exception.
+ try {
+ return thing is Location;
+ } catch (e) {
+ return false;
+ }
+ }
+
+ /**
+ * Executes a [callback] after the next batch of browser layout measurements
+ * has completed or would have completed if any browser layout measurements
+ * had been scheduled.
+ */
+ void requestLayoutFrame(TimeoutHandler callback) {
+ _addMeasurementFrameCallback(callback);
+ }
+
+ /** @domName DOMWindow.requestAnimationFrame */
+ int requestAnimationFrame(RequestAnimationFrameCallback callback) {
+ _ensureRequestAnimationFrame();
+ return _requestAnimationFrame(callback);
+ }
+
+ void cancelAnimationFrame(id) {
+ _ensureRequestAnimationFrame();
+ _cancelAnimationFrame(id);
+ }
+
+ @JSName('requestAnimationFrame')
+ int _requestAnimationFrame(RequestAnimationFrameCallback callback) native;
+
+ @JSName('cancelAnimationFrame')
+ void _cancelAnimationFrame(int id) native;
+
+ _ensureRequestAnimationFrame() {
+ if (JS('bool',
+ '!!(#.requestAnimationFrame && #.cancelAnimationFrame)', this, this))
+ return;
+
+ JS('void',
+ r"""
+ (function($this) {
+ var vendors = ['ms', 'moz', 'webkit', 'o'];
+ for (var i = 0; i < vendors.length && !$this.requestAnimationFrame; ++i) {
+ $this.requestAnimationFrame = $this[vendors[i] + 'RequestAnimationFrame'];
+ $this.cancelAnimationFrame =
+ $this[vendors[i]+'CancelAnimationFrame'] ||
+ $this[vendors[i]+'CancelRequestAnimationFrame'];
+ }
+ if ($this.requestAnimationFrame && $this.cancelAnimationFrame) return;
+ $this.requestAnimationFrame = function(callback) {
+ return window.setTimeout(function() {
+ callback(Date.now());
+ }, 16 /* 16ms ~= 60fps */);
+ };
+ $this.cancelAnimationFrame = function(id) { clearTimeout(id); }
+ })(#)""",
+ this);
+ }
+
+ IdbFactory get indexedDB =>
+ JS('IdbFactory',
+ '#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
+ this, this, this);
+
+ /**
+ * Lookup a port by its [name]. Return null if no port is
+ * registered under [name].
+ */
+ SendPortSync lookupPort(String name) {
+ var port = JSON.parse(document.documentElement.attributes['dart-port:$name']);
+ return _deserialize(port);
+ }
+
+ /**
+ * Register a [port] on this window under the given [name]. This
+ * port may be retrieved by any isolate (or JavaScript script)
+ * running in this window.
+ */
+ void registerPort(String name, var port) {
+ var serialized = _serialize(port);
+ document.documentElement.attributes['dart-port:$name'] = JSON.stringify(serialized);
+ }
+
+ /// @domName Window.console; @docsEditable true
+ Console get console => Console.safeConsole;
+
+
+ /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
+ WindowEvents get on =>
+ new WindowEvents(this);
+
+ static const int PERSISTENT = 1;
+
+ static const int TEMPORARY = 0;
+
+ /// @domName Window.applicationCache; @docsEditable true
+ final ApplicationCache applicationCache;
+
+ /// @domName Window.closed; @docsEditable true
+ final bool closed;
+
+ /// @domName Window.crypto; @docsEditable true
+ final Crypto crypto;
+
+ /// @domName Window.defaultStatus; @docsEditable true
+ String defaultStatus;
+
+ /// @domName Window.defaultstatus; @docsEditable true
+ String defaultstatus;
+
+ /// @domName Window.devicePixelRatio; @docsEditable true
+ final num devicePixelRatio;
+
+ /// @domName Window.event; @docsEditable true
+ final Event event;
+
+ /// @domName Window.history; @docsEditable true
+ final History history;
+
+ /// @domName Window.innerHeight; @docsEditable true
+ final int innerHeight;
+
+ /// @domName Window.innerWidth; @docsEditable true
+ final int innerWidth;
+
+ /// @domName Window.localStorage; @docsEditable true
+ final Storage localStorage;
+
+ /// @domName Window.locationbar; @docsEditable true
+ final BarInfo locationbar;
+
+ /// @domName Window.menubar; @docsEditable true
+ final BarInfo menubar;
+
+ /// @domName Window.name; @docsEditable true
+ String name;
+
+ /// @domName Window.navigator; @docsEditable true
+ final Navigator navigator;
+
+ /// @domName Window.offscreenBuffering; @docsEditable true
+ final bool offscreenBuffering;
+
+ /// @domName Window.opener; @docsEditable true
+ WindowBase get opener => _convertNativeToDart_Window(this._opener);
+ @JSName('opener')
+ @Creates('Window|=Object') @Returns('Window|=Object')
+ final dynamic _opener;
+
+ /// @domName Window.outerHeight; @docsEditable true
+ final int outerHeight;
+
+ /// @domName Window.outerWidth; @docsEditable true
+ final int outerWidth;
+
+ /// @domName DOMWindow.pagePopupController; @docsEditable true
+ final PagePopupController pagePopupController;
+
+ /// @domName Window.pageXOffset; @docsEditable true
+ final int pageXOffset;
+
+ /// @domName Window.pageYOffset; @docsEditable true
+ final int pageYOffset;
+
+ /// @domName Window.parent; @docsEditable true
+ WindowBase get parent => _convertNativeToDart_Window(this._parent);
+ @JSName('parent')
+ @Creates('Window|=Object') @Returns('Window|=Object')
+ final dynamic _parent;
+
+ /// @domName Window.performance; @docsEditable true
+ final Performance performance;
+
+ /// @domName Window.personalbar; @docsEditable true
+ final BarInfo personalbar;
+
+ /// @domName Window.screen; @docsEditable true
+ final Screen screen;
+
+ /// @domName Window.screenLeft; @docsEditable true
+ final int screenLeft;
+
+ /// @domName Window.screenTop; @docsEditable true
+ final int screenTop;
+
+ /// @domName Window.screenX; @docsEditable true
+ final int screenX;
+
+ /// @domName Window.screenY; @docsEditable true
+ final int screenY;
+
+ /// @domName Window.scrollX; @docsEditable true
+ final int scrollX;
+
+ /// @domName Window.scrollY; @docsEditable true
+ final int scrollY;
+
+ /// @domName Window.scrollbars; @docsEditable true
+ final BarInfo scrollbars;
+
+ /// @domName Window.self; @docsEditable true
+ WindowBase get self => _convertNativeToDart_Window(this._self);
+ @JSName('self')
+ @Creates('Window|=Object') @Returns('Window|=Object')
+ final dynamic _self;
+
+ /// @domName Window.sessionStorage; @docsEditable true
+ final Storage sessionStorage;
+
+ /// @domName Window.status; @docsEditable true
+ String status;
+
+ /// @domName Window.statusbar; @docsEditable true
+ final BarInfo statusbar;
+
+ /// @domName Window.styleMedia; @docsEditable true
+ final StyleMedia styleMedia;
+
+ /// @domName Window.toolbar; @docsEditable true
+ final BarInfo toolbar;
+
+ /// @domName Window.top; @docsEditable true
+ WindowBase get top => _convertNativeToDart_Window(this._top);
+ @JSName('top')
+ @Creates('Window|=Object') @Returns('Window|=Object')
+ final dynamic _top;
+
+ /// @domName DOMWindow.webkitNotifications; @docsEditable true
+ final NotificationCenter webkitNotifications;
+
+ /// @domName DOMWindow.webkitStorageInfo; @docsEditable true
+ final StorageInfo webkitStorageInfo;
+
+ /// @domName Window.window; @docsEditable true
+ WindowBase get window => _convertNativeToDart_Window(this._window);
+ @JSName('window')
+ @Creates('Window|=Object') @Returns('Window|=Object')
+ final dynamic _window;
+
+ /// @domName Window.addEventListener; @docsEditable true
+ @JSName('addEventListener')
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+
+ /// @domName Window.alert; @docsEditable true
+ void alert(String message) native;
- /// @domName WebGLRenderingContext.uniform1fv; @docsEditable true
- void uniform1fv(WebGLUniformLocation location, Float32Array v) native;
+ /// @domName Window.atob; @docsEditable true
+ String atob(String string) native;
- /// @domName WebGLRenderingContext.uniform1i; @docsEditable true
- void uniform1i(WebGLUniformLocation location, int x) native;
+ /// @domName Window.btoa; @docsEditable true
+ String btoa(String string) native;
- /// @domName WebGLRenderingContext.uniform1iv; @docsEditable true
- void uniform1iv(WebGLUniformLocation location, Int32Array v) native;
+ /// @domName Window.captureEvents; @docsEditable true
+ void captureEvents() native;
- /// @domName WebGLRenderingContext.uniform2f; @docsEditable true
- void uniform2f(WebGLUniformLocation location, num x, num y) native;
+ /// @domName Window.clearInterval; @docsEditable true
+ void clearInterval(int handle) native;
- /// @domName WebGLRenderingContext.uniform2fv; @docsEditable true
- void uniform2fv(WebGLUniformLocation location, Float32Array v) native;
+ /// @domName Window.clearTimeout; @docsEditable true
+ void clearTimeout(int handle) native;
- /// @domName WebGLRenderingContext.uniform2i; @docsEditable true
- void uniform2i(WebGLUniformLocation location, int x, int y) native;
+ /// @domName Window.close; @docsEditable true
+ void close() native;
- /// @domName WebGLRenderingContext.uniform2iv; @docsEditable true
- void uniform2iv(WebGLUniformLocation location, Int32Array v) native;
+ /// @domName Window.confirm; @docsEditable true
+ bool confirm(String message) native;
- /// @domName WebGLRenderingContext.uniform3f; @docsEditable true
- void uniform3f(WebGLUniformLocation location, num x, num y, num z) native;
+ /// @domName Window.dispatchEvent; @docsEditable true
+ @JSName('dispatchEvent')
+ bool $dom_dispatchEvent(Event evt) native;
- /// @domName WebGLRenderingContext.uniform3fv; @docsEditable true
- void uniform3fv(WebGLUniformLocation location, Float32Array v) native;
+ /// @domName Window.find; @docsEditable true
+ bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog) native;
- /// @domName WebGLRenderingContext.uniform3i; @docsEditable true
- void uniform3i(WebGLUniformLocation location, int x, int y, int z) native;
+ /// @domName Window.getComputedStyle; @docsEditable true
+ @JSName('getComputedStyle')
+ CssStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElement) native;
- /// @domName WebGLRenderingContext.uniform3iv; @docsEditable true
- void uniform3iv(WebGLUniformLocation location, Int32Array v) native;
+ /// @domName Window.getMatchedCSSRules; @docsEditable true
+ @JSName('getMatchedCSSRules')
+ @Returns('_CssRuleList') @Creates('_CssRuleList')
+ List<CssRule> getMatchedCssRules(Element element, String pseudoElement) native;
- /// @domName WebGLRenderingContext.uniform4f; @docsEditable true
- void uniform4f(WebGLUniformLocation location, num x, num y, num z, num w) native;
+ /// @domName Window.getSelection; @docsEditable true
+ DomSelection getSelection() native;
- /// @domName WebGLRenderingContext.uniform4fv; @docsEditable true
- void uniform4fv(WebGLUniformLocation location, Float32Array v) native;
+ /// @domName Window.matchMedia; @docsEditable true
+ MediaQueryList matchMedia(String query) native;
- /// @domName WebGLRenderingContext.uniform4i; @docsEditable true
- void uniform4i(WebGLUniformLocation location, int x, int y, int z, int w) native;
+ /// @domName Window.moveBy; @docsEditable true
+ void moveBy(num x, num y) native;
- /// @domName WebGLRenderingContext.uniform4iv; @docsEditable true
- void uniform4iv(WebGLUniformLocation location, Int32Array v) native;
+ /// @domName Window.moveTo; @docsEditable true
+ void moveTo(num x, num y) native;
- /// @domName WebGLRenderingContext.uniformMatrix2fv; @docsEditable true
- void uniformMatrix2fv(WebGLUniformLocation location, bool transpose, Float32Array array) native;
+ /// @domName DOMWindow.openDatabase; @docsEditable true
+ @Creates('Database') @Creates('DatabaseSync')
+ Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native;
- /// @domName WebGLRenderingContext.uniformMatrix3fv; @docsEditable true
- void uniformMatrix3fv(WebGLUniformLocation location, bool transpose, Float32Array array) native;
+ /// @domName Window.postMessage; @docsEditable true
+ void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) {
+ if (?message &&
+ !?messagePorts) {
+ var message_1 = convertDartToNative_SerializedScriptValue(message);
+ _postMessage_1(message_1, targetOrigin);
+ return;
+ }
+ if (?message) {
+ var message_2 = convertDartToNative_SerializedScriptValue(message);
+ _postMessage_2(message_2, targetOrigin, messagePorts);
+ return;
+ }
+ throw new ArgumentError("Incorrect number or type of arguments");
+ }
+ @JSName('postMessage')
+ void _postMessage_1(message, targetOrigin) native;
+ @JSName('postMessage')
+ void _postMessage_2(message, targetOrigin, List messagePorts) native;
- /// @domName WebGLRenderingContext.uniformMatrix4fv; @docsEditable true
- void uniformMatrix4fv(WebGLUniformLocation location, bool transpose, Float32Array array) native;
+ /// @domName Window.print; @docsEditable true
+ void print() native;
- /// @domName WebGLRenderingContext.useProgram; @docsEditable true
- void useProgram(WebGLProgram program) native;
+ /// @domName Window.releaseEvents; @docsEditable true
+ void releaseEvents() native;
- /// @domName WebGLRenderingContext.validateProgram; @docsEditable true
- void validateProgram(WebGLProgram program) native;
+ /// @domName Window.removeEventListener; @docsEditable true
+ @JSName('removeEventListener')
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- /// @domName WebGLRenderingContext.vertexAttrib1f; @docsEditable true
- void vertexAttrib1f(int indx, num x) native;
+ /// @domName Window.resizeBy; @docsEditable true
+ void resizeBy(num x, num y) native;
- /// @domName WebGLRenderingContext.vertexAttrib1fv; @docsEditable true
- void vertexAttrib1fv(int indx, Float32Array values) native;
+ /// @domName Window.resizeTo; @docsEditable true
+ void resizeTo(num width, num height) native;
- /// @domName WebGLRenderingContext.vertexAttrib2f; @docsEditable true
- void vertexAttrib2f(int indx, num x, num y) native;
+ /// @domName Window.scroll; @docsEditable true
+ void scroll(int x, int y) native;
- /// @domName WebGLRenderingContext.vertexAttrib2fv; @docsEditable true
- void vertexAttrib2fv(int indx, Float32Array values) native;
+ /// @domName Window.scrollBy; @docsEditable true
+ void scrollBy(int x, int y) native;
- /// @domName WebGLRenderingContext.vertexAttrib3f; @docsEditable true
- void vertexAttrib3f(int indx, num x, num y, num z) native;
+ /// @domName Window.scrollTo; @docsEditable true
+ void scrollTo(int x, int y) native;
- /// @domName WebGLRenderingContext.vertexAttrib3fv; @docsEditable true
- void vertexAttrib3fv(int indx, Float32Array values) native;
+ /// @domName Window.setInterval; @docsEditable true
+ int setInterval(TimeoutHandler handler, int timeout) native;
- /// @domName WebGLRenderingContext.vertexAttrib4f; @docsEditable true
- void vertexAttrib4f(int indx, num x, num y, num z, num w) native;
+ /// @domName Window.setTimeout; @docsEditable true
+ int setTimeout(TimeoutHandler handler, int timeout) native;
- /// @domName WebGLRenderingContext.vertexAttrib4fv; @docsEditable true
- void vertexAttrib4fv(int indx, Float32Array values) native;
+ /// @domName Window.showModalDialog; @docsEditable true
+ Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) native;
- /// @domName WebGLRenderingContext.vertexAttribPointer; @docsEditable true
- void vertexAttribPointer(int indx, int size, int type, bool normalized, int stride, int offset) native;
+ /// @domName Window.stop; @docsEditable true
+ void stop() native;
- /// @domName WebGLRenderingContext.viewport; @docsEditable true
- void viewport(int x, int y, int width, int height) 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 Window.webkitConvertPointFromNodeToPage; @docsEditable true
+ Point webkitConvertPointFromNodeToPage(Node node, Point p) native;
+ /// @domName Window.webkitConvertPointFromPageToNode; @docsEditable true
+ Point webkitConvertPointFromPageToNode(Node node, Point p) native;
+
+ /// @domName DOMWindow.webkitRequestFileSystem; @docsEditable true
+ void webkitRequestFileSystem(int type, int size, FileSystemCallback successCallback, [ErrorCallback errorCallback]) native;
+
+ /// @domName DOMWindow.webkitResolveLocalFileSystemURL; @docsEditable true
+ @JSName('webkitResolveLocalFileSystemURL')
+ void webkitResolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native;
-/// @domName WebGLShader; @docsEditable true
-class WebGLShader native "*WebGLShader" {
}
-// 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 true
+class WindowEvents extends Events {
+ /// @docsEditable true
+ WindowEvents(EventTarget _ptr) : super(_ptr);
-/// @domName WebGLShaderPrecisionFormat; @docsEditable true
-class WebGLShaderPrecisionFormat native "*WebGLShaderPrecisionFormat" {
+ /// @docsEditable true
+ EventListenerList get contentLoaded => this['DOMContentLoaded'];
- /// @domName WebGLShaderPrecisionFormat.precision; @docsEditable true
- final int precision;
+ /// @docsEditable true
+ EventListenerList get abort => this['abort'];
- /// @domName WebGLShaderPrecisionFormat.rangeMax; @docsEditable true
- final int rangeMax;
+ /// @docsEditable true
+ EventListenerList get beforeUnload => this['beforeunload'];
- /// @domName WebGLShaderPrecisionFormat.rangeMin; @docsEditable true
- final int rangeMin;
-}
-// 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 true
+ EventListenerList get blur => this['blur'];
+ /// @docsEditable true
+ EventListenerList get canPlay => this['canplay'];
-/// @domName WebGLTexture; @docsEditable true
-class WebGLTexture native "*WebGLTexture" {
-}
-// 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 true
+ EventListenerList get canPlayThrough => this['canplaythrough'];
+ /// @docsEditable true
+ EventListenerList get change => this['change'];
-/// @domName WebGLUniformLocation; @docsEditable true
-class WebGLUniformLocation native "*WebGLUniformLocation" {
-}
-// 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 true
+ EventListenerList get click => this['click'];
+ /// @docsEditable true
+ EventListenerList get contextMenu => this['contextmenu'];
-/// @domName WebGLVertexArrayObjectOES; @docsEditable true
-class WebGLVertexArrayObject native "*WebGLVertexArrayObjectOES" {
-}
-// 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 true
+ EventListenerList get doubleClick => this['dblclick'];
+ /// @docsEditable true
+ EventListenerList get deviceMotion => this['devicemotion'];
-/// @domName WebKitCSSFilterValue; @docsEditable true
-class WebKitCssFilterValue extends _CssValueList native "*WebKitCSSFilterValue" {
+ /// @docsEditable true
+ EventListenerList get deviceOrientation => this['deviceorientation'];
- static const int CSS_FILTER_BLUR = 10;
+ /// @docsEditable true
+ EventListenerList get drag => this['drag'];
- static const int CSS_FILTER_BRIGHTNESS = 8;
+ /// @docsEditable true
+ EventListenerList get dragEnd => this['dragend'];
- static const int CSS_FILTER_CONTRAST = 9;
+ /// @docsEditable true
+ EventListenerList get dragEnter => this['dragenter'];
- static const int CSS_FILTER_CUSTOM = 12;
+ /// @docsEditable true
+ EventListenerList get dragLeave => this['dragleave'];
- static const int CSS_FILTER_DROP_SHADOW = 11;
+ /// @docsEditable true
+ EventListenerList get dragOver => this['dragover'];
- static const int CSS_FILTER_GRAYSCALE = 2;
+ /// @docsEditable true
+ EventListenerList get dragStart => this['dragstart'];
- static const int CSS_FILTER_HUE_ROTATE = 5;
+ /// @docsEditable true
+ EventListenerList get drop => this['drop'];
- static const int CSS_FILTER_INVERT = 6;
+ /// @docsEditable true
+ EventListenerList get durationChange => this['durationchange'];
- static const int CSS_FILTER_OPACITY = 7;
+ /// @docsEditable true
+ EventListenerList get emptied => this['emptied'];
- static const int CSS_FILTER_REFERENCE = 1;
+ /// @docsEditable true
+ EventListenerList get ended => this['ended'];
- static const int CSS_FILTER_SATURATE = 4;
+ /// @docsEditable true
+ EventListenerList get error => this['error'];
- static const int CSS_FILTER_SEPIA = 3;
+ /// @docsEditable true
+ EventListenerList get focus => this['focus'];
- /// @domName WebKitCSSFilterValue.operationType; @docsEditable true
- final int operationType;
-}
-// 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 true
+ EventListenerList get hashChange => this['hashchange'];
+ /// @docsEditable true
+ EventListenerList get input => this['input'];
-/// @domName WebKitNamedFlow; @docsEditable true
-class WebKitNamedFlow extends EventTarget native "*WebKitNamedFlow" {
+ /// @docsEditable true
+ EventListenerList get invalid => this['invalid'];
- /// @domName WebKitNamedFlow.firstEmptyRegionIndex; @docsEditable true
- final int firstEmptyRegionIndex;
+ /// @docsEditable true
+ EventListenerList get keyDown => this['keydown'];
- /// @domName WebKitNamedFlow.name; @docsEditable true
- final String name;
+ /// @docsEditable true
+ EventListenerList get keyPress => this['keypress'];
- /// @domName WebKitNamedFlow.overset; @docsEditable true
- final bool overset;
+ /// @docsEditable true
+ EventListenerList get keyUp => this['keyup'];
- /// @domName WebKitNamedFlow.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @docsEditable true
+ EventListenerList get load => this['load'];
- /// @domName WebKitNamedFlow.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ /// @docsEditable true
+ EventListenerList get loadedData => this['loadeddata'];
- /// @domName WebKitNamedFlow.getContent; @docsEditable true
- @Returns('NodeList') @Creates('NodeList')
- List<Node> getContent() native;
+ /// @docsEditable true
+ EventListenerList get loadedMetadata => this['loadedmetadata'];
- /// @domName WebKitNamedFlow.getRegions; @docsEditable true
- @Returns('NodeList') @Creates('NodeList')
- List<Node> getRegions() native;
+ /// @docsEditable true
+ EventListenerList get loadStart => this['loadstart'];
- /// @domName WebKitNamedFlow.getRegionsByContent; @docsEditable true
- @Returns('NodeList') @Creates('NodeList')
- List<Node> getRegionsByContent(Node contentNode) native;
+ /// @docsEditable true
+ EventListenerList get message => this['message'];
- /// @domName WebKitNamedFlow.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- 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 true
+ EventListenerList get mouseDown => this['mousedown'];
-// WARNING: Do not edit - generated code.
+ /// @docsEditable true
+ EventListenerList get mouseMove => this['mousemove'];
+ /// @docsEditable true
+ EventListenerList get mouseOut => this['mouseout'];
-/// @domName WebSocket
-class WebSocket extends EventTarget native "*WebSocket" {
- factory WebSocket(String url) => _WebSocketFactoryProvider.createWebSocket(url);
+ /// @docsEditable true
+ EventListenerList get mouseOver => this['mouseover'];
- /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent; @docsEditable true
- WebSocketEvents get on =>
- new WebSocketEvents(this);
+ /// @docsEditable true
+ EventListenerList get mouseUp => this['mouseup'];
- static const int CLOSED = 3;
+ /// @docsEditable true
+ EventListenerList get mouseWheel => this['mousewheel'];
- static const int CLOSING = 2;
+ /// @docsEditable true
+ EventListenerList get offline => this['offline'];
- static const int CONNECTING = 0;
+ /// @docsEditable true
+ EventListenerList get online => this['online'];
- static const int OPEN = 1;
+ /// @docsEditable true
+ EventListenerList get pageHide => this['pagehide'];
- /// @domName WebSocket.URL; @docsEditable true
- @JSName('URL')
- final String Url;
+ /// @docsEditable true
+ EventListenerList get pageShow => this['pageshow'];
- /// @domName WebSocket.binaryType; @docsEditable true
- String binaryType;
+ /// @docsEditable true
+ EventListenerList get pause => this['pause'];
- /// @domName WebSocket.bufferedAmount; @docsEditable true
- final int bufferedAmount;
+ /// @docsEditable true
+ EventListenerList get play => this['play'];
- /// @domName WebSocket.extensions; @docsEditable true
- final String extensions;
+ /// @docsEditable true
+ EventListenerList get playing => this['playing'];
- /// @domName WebSocket.protocol; @docsEditable true
- final String protocol;
+ /// @docsEditable true
+ EventListenerList get popState => this['popstate'];
- /// @domName WebSocket.readyState; @docsEditable true
- final int readyState;
+ /// @docsEditable true
+ EventListenerList get progress => this['progress'];
- /// @domName WebSocket.url; @docsEditable true
- final String url;
+ /// @docsEditable true
+ EventListenerList get rateChange => this['ratechange'];
- /// @domName WebSocket.addEventListener; @docsEditable true
- @JSName('addEventListener')
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @docsEditable true
+ EventListenerList get reset => this['reset'];
- /// @domName WebSocket.close; @docsEditable true
- void close([int code, String reason]) native;
+ /// @docsEditable true
+ EventListenerList get resize => this['resize'];
- /// @domName WebSocket.dispatchEvent; @docsEditable true
- @JSName('dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ /// @docsEditable true
+ EventListenerList get scroll => this['scroll'];
- /// @domName WebSocket.removeEventListener; @docsEditable true
- @JSName('removeEventListener')
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /// @docsEditable true
+ EventListenerList get search => this['search'];
- /// @domName WebSocket.send; @docsEditable true
- void send(data) native;
+ /// @docsEditable true
+ EventListenerList get seeked => this['seeked'];
-}
+ /// @docsEditable true
+ EventListenerList get seeking => this['seeking'];
-/// @docsEditable true
-class WebSocketEvents extends Events {
/// @docsEditable true
- WebSocketEvents(EventTarget _ptr) : super(_ptr);
+ EventListenerList get select => this['select'];
/// @docsEditable true
- EventListenerList get close => this['close'];
+ EventListenerList get stalled => this['stalled'];
/// @docsEditable true
- EventListenerList get error => this['error'];
+ EventListenerList get storage => this['storage'];
/// @docsEditable true
- EventListenerList get message => this['message'];
+ EventListenerList get submit => this['submit'];
/// @docsEditable true
- EventListenerList get open => this['open'];
-}
-// 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.
+ EventListenerList get suspend => this['suspend'];
+ /// @docsEditable true
+ EventListenerList get timeUpdate => this['timeupdate'];
-/// @domName WheelEvent
-class WheelEvent extends MouseEvent native "*WheelEvent" {
+ /// @docsEditable true
+ EventListenerList get touchCancel => this['touchcancel'];
- /// @domName WheelEvent.webkitDirectionInvertedFromDevice; @docsEditable true
- final bool webkitDirectionInvertedFromDevice;
+ /// @docsEditable true
+ EventListenerList get touchEnd => this['touchend'];
- /// @domName WheelEvent.initWebKitWheelEvent; @docsEditable true
- void initWebKitWheelEvent(int wheelDeltaX, int wheelDeltaY, LocalWindow view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native;
+ /// @docsEditable true
+ EventListenerList get touchMove => this['touchmove'];
+ /// @docsEditable true
+ EventListenerList get touchStart => this['touchstart'];
- /** @domName WheelEvent.deltaY */
- num get deltaY {
- if (JS('bool', '#.deltaY !== undefined', this)) {
- // W3C WheelEvent
- return this._deltaY;
- } else if (JS('bool', '#.wheelDelta !== undefined', this)) {
- // Chrome and IE
- return this._wheelDelta;
- } else if (JS('bool', '#.detail !== undefined', this)) {
- // Firefox
+ /// @docsEditable true
+ EventListenerList get unload => this['unload'];
- // Handle DOMMouseScroll case where it uses detail and the axis to
- // differentiate.
- if (JS('bool', '#.axis == MouseScrollEvent.VERTICAL_AXIS', this)) {
- var detail = this._detail;
- // Firefox is normally the number of lines to scale (normally 3)
- // so multiply it by 40 to get pixels to move, matching IE & WebKit.
- if (detail < 100) {
- return detail * 40;
- }
- return detail;
- }
- return 0;
- }
- throw new UnsupportedError(
- 'deltaY is not supported');
- }
+ /// @docsEditable true
+ EventListenerList get volumeChange => this['volumechange'];
- /** @domName WheelEvent.deltaX */
- num get deltaX {
- if (JS('bool', '#.deltaX !== undefined', this)) {
- // W3C WheelEvent
- return this._deltaX;
- } else if (JS('bool', '#.wheelDeltaX !== undefined', this)) {
- // Chrome
- return this._wheelDeltaX;
- } else if (JS('bool', '#.detail !== undefined', this)) {
- // Firefox and IE.
- // IE will have detail set but will not set axis.
+ /// @docsEditable true
+ EventListenerList get waiting => this['waiting'];
- // Handle DOMMouseScroll case where it uses detail and the axis to
- // differentiate.
- if (JS('bool', '#.axis !== undefined && #.axis == MouseScrollEvent.HORIZONTAL_AXIS', this, this)) {
- var detail = this._detail;
- // Firefox is normally the number of lines to scale (normally 3)
- // so multiply it by 40 to get pixels to move, matching IE & WebKit.
- if (detail < 100) {
- return detail * 40;
- }
- return detail;
- }
- return 0;
- }
- throw new UnsupportedError(
- 'deltaX is not supported');
- }
+ /// @docsEditable true
+ EventListenerList get animationEnd => this['webkitAnimationEnd'];
- int get deltaMode {
- if (JS('bool', '!!#.deltaMode', this)) {
- // If not available then we're poly-filling and doing pixel scroll.
- return 0;
- }
- return this._deltaMode;
- }
+ /// @docsEditable true
+ EventListenerList get animationIteration => this['webkitAnimationIteration'];
- num get _deltaY => JS('num', '#.deltaY', this);
- num get _deltaX => JS('num', '#.deltaX', this);
- num get _wheelDelta => JS('num', '#.wheelDelta', this);
- num get _wheelDeltaX => JS('num', '#.wheelDeltaX', this);
- num get _detail => JS('num', '#.detail', this);
- int get _deltaMode => JS('int', '#.deltaMode', this);
+ /// @docsEditable true
+ EventListenerList get animationStart => this['webkitAnimationStart'];
+ /// @docsEditable true
+ EventListenerList get transitionEnd => this['webkitTransitionEnd'];
}
// 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
@@ -23093,7 +23095,7 @@ class _DataAttributeMap implements Map<String, String> {
* is the container that displays a [Document]'s content. All web scripting
* happens within the context of a [Window] object.
*
- * **Note:** This class represents any window, whereas [LocalWindow] is
+ * **Note:** This class represents any window, whereas [Window] is
* used to access the properties and content of the current window.
*
* See also:
@@ -23101,7 +23103,7 @@ class _DataAttributeMap implements Map<String, String> {
* * [DOM Window](https://developer.mozilla.org/en-US/docs/DOM/window) from MDN.
* * [Window](http://www.w3.org/TR/Window/) from the W3C.
*/
-abstract class Window {
+abstract class WindowBase {
// Fields.
/**
@@ -23110,8 +23112,8 @@ abstract class Window {
* Location currentLocation = window.location;
* print(currentLocation.href); // 'http://www.example.com:80/'
*/
- Location get location;
- History get history;
+ LocationBase get location;
+ HistoryBase get history;
/**
* Indicates whether this window has been closed.
@@ -23126,16 +23128,16 @@ abstract class Window {
* A reference to the window that opened this one.
*
* Window thisWindow = window;
- * Window otherWindow = thisWindow.open('http://www.example.com/', 'foo');
+ * WindowBase otherWindow = thisWindow.open('http://www.example.com/', 'foo');
* print(otherWindow.opener == thisWindow); // 'true'
*/
- Window get opener;
+ WindowBase get opener;
/**
* A reference to the parent of this window.
*
- * If this [Window] has no parent, [parent] will return a reference to
- * the [Window] itself.
+ * If this [WindowBase] has no parent, [parent] will return a reference to
+ * the [WindowBase] itself.
*
* IFrameElement myIFrame = new IFrameElement();
* window.document.body.elements.add(myIFrame);
@@ -23143,13 +23145,13 @@ abstract class Window {
*
* print(window.parent == window) // 'true'
*/
- Window get parent;
+ WindowBase get parent;
/**
* A reference to the topmost window in the window hierarchy.
*
- * If this [Window] is the topmost [Window], [top] will return a reference to
- * the [Window] itself.
+ * If this [WindowBase] is the topmost [WindowBase], [top] will return a
+ * reference to the [WindowBase] itself.
*
* // Add an IFrame to the current window.
* IFrameElement myIFrame = new IFrameElement();
@@ -23164,13 +23166,13 @@ abstract class Window {
*
* print(window.top == window) // 'true'
*/
- Window get top;
+ WindowBase get top;
// Methods.
/**
* Closes the window.
*
- * This method should only succeed if the [Window] object is
+ * This method should only succeed if the [WindowBase] object is
* **script-closeable** and the window calling [close] is allowed to navigate
* the window.
*
@@ -23199,11 +23201,11 @@ abstract class Window {
void postMessage(var message, String targetOrigin, [List messagePorts]);
}
-abstract class Location {
+abstract class LocationBase {
void set href(String val);
}
-abstract class History {
+abstract class HistoryBase {
void back();
void forward();
void go(int distance);
@@ -25311,7 +25313,7 @@ class _DocumentFragmentFactoryProvider {
// window as a parameter.
-Window _convertNativeToDart_Window(win) {
+WindowBase _convertNativeToDart_Window(win) {
return _DOMWindowCrossFrame._createSafe(win);
}
@@ -25381,27 +25383,27 @@ _convertDartToNative_ImageData(ImageData imageData) {
// TODO(vsm): Unify with Dartium version.
-class _DOMWindowCrossFrame implements Window {
+class _DOMWindowCrossFrame implements WindowBase {
// Private window. Note, this is a window in another frame, so it
// cannot be typed as "Window" as its prototype is not patched
// properly. Its fields and methods can only be accessed via JavaScript.
var _window;
// Fields.
- History get history =>
- _HistoryCrossFrame._createSafe(JS('History', '#.history', _window));
- Location get location =>
- _LocationCrossFrame._createSafe(JS('Location', '#.location', _window));
+ HistoryBase get history =>
+ _HistoryCrossFrame._createSafe(JS('HistoryBase', '#.history', _window));
+ LocationBase get location =>
+ _LocationCrossFrame._createSafe(JS('LocationBase', '#.location', _window));
// TODO(vsm): Add frames to navigate subframes. See 2312.
bool get closed => JS('bool', '#.closed', _window);
- Window get opener => _createSafe(JS('Window', '#.opener', _window));
+ WindowBase get opener => _createSafe(JS('WindowBase', '#.opener', _window));
- Window get parent => _createSafe(JS('Window', '#.parent', _window));
+ WindowBase get parent => _createSafe(JS('WindowBase', '#.parent', _window));
- Window get top => _createSafe(JS('Window', '#.top', _window));
+ WindowBase get top => _createSafe(JS('WindowBase', '#.top', _window));
// Methods.
void close() => JS('void', '#.close()', _window);
@@ -25417,7 +25419,7 @@ class _DOMWindowCrossFrame implements Window {
// Implementation support.
_DOMWindowCrossFrame(this._window);
- static Window _createSafe(w) {
+ static WindowBase _createSafe(w) {
if (identical(w, window)) {
return w;
} else {
@@ -25427,7 +25429,7 @@ class _DOMWindowCrossFrame implements Window {
}
}
-class _LocationCrossFrame implements Location {
+class _LocationCrossFrame implements LocationBase {
// Private location. Note, this is a location object in another frame, so it
// cannot be typed as "Location" as its prototype is not patched
// properly. Its fields and methods can only be accessed via JavaScript.
@@ -25441,7 +25443,7 @@ class _LocationCrossFrame implements Location {
// Implementation support.
_LocationCrossFrame(this._location);
- static Location _createSafe(location) {
+ static LocationBase _createSafe(location) {
if (identical(location, window.location)) {
return location;
} else {
@@ -25451,7 +25453,7 @@ class _LocationCrossFrame implements Location {
}
}
-class _HistoryCrossFrame implements History {
+class _HistoryCrossFrame implements HistoryBase {
// Private history. Note, this is a history object in another frame, so it
// cannot be typed as "History" as its prototype is not patched
// properly. Its fields and methods can only be accessed via JavaScript.
@@ -25466,7 +25468,7 @@ class _HistoryCrossFrame implements History {
// Implementation support.
_HistoryCrossFrame(this._history);
- static History _createSafe(h) {
+ static HistoryBase _createSafe(h) {
if (identical(h, window.history)) {
return h;
} else {
@@ -25573,7 +25575,7 @@ class KeyEvent implements KeyboardEvent {
void stopImmediatePropagation() => _parent.stopImmediatePropagation();
void stopPropagation() => _parent.stopPropagation();
void $dom_initUIEvent(String type, bool canBubble, bool cancelable,
- LocalWindow view, int detail) {
+ Window view, int detail) {
throw new UnsupportedError("Cannot initialize a UI Event from a KeyEvent.");
}
void $dom_initEvent(String eventTypeArg, bool canBubbleArg,
@@ -25589,7 +25591,7 @@ class KeyEvent implements KeyboardEvent {
throw new UnsupportedError("keyIdentifier is unsupported.");
}
void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable,
- LocalWindow view, String keyIdentifier, int keyLocation, bool ctrlKey,
+ Window view, String keyIdentifier, int keyLocation, bool ctrlKey,
bool altKey, bool shiftKey, bool metaKey,
bool altGraphKey) {
throw new UnsupportedError(
@@ -25624,7 +25626,7 @@ class _TextFactoryProvider {
// It can't be monkey-patched and seems immune to putting methods on
// Object.prototype. We are forced to wrap the object.
-class _LocationWrapper implements LocalLocation {
+class _LocationWrapper implements Location {
final _ptr; // Opaque reference to real location.
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/scripts/htmlrenamer.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698