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

Unified Diff: lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 10698049: Unfork html events generation in dart2js and dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
Index: lib/html/dartium/html_dartium.dart
diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart
index 53027ca8fe75e108d27b533cbdad44f1be15a8c7..db40cb09df5b757940e79aaee0670ec75dfe59b9 100644
--- a/lib/html/dartium/html_dartium.dart
+++ b/lib/html/dartium/html_dartium.dart
@@ -50,8 +50,8 @@ final _null = const _Null();
class _AbstractWorkerEventsImpl extends _EventsImpl implements AbstractWorkerEvents {
_AbstractWorkerEventsImpl(_ptr) : super(_ptr);
- EventListenerList get error() => this['error'];
+ EventListenerList get error() => this['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
@@ -59,13 +59,10 @@ class _AbstractWorkerEventsImpl extends _EventsImpl implements AbstractWorkerEve
// WARNING: Do not edit - generated code.
-class _AbstractWorkerImpl extends NativeFieldWrapperClass1 implements AbstractWorker {
- _EventsImpl _on;
+class _AbstractWorkerImpl extends _EventTargetImpl implements AbstractWorker {
- _AbstractWorkerEventsImpl get on() {
- if (_on === null) _on = new _AbstractWorkerEventsImpl(this);
- return _on;
- }
+ _AbstractWorkerEventsImpl get on() =>
+ new _AbstractWorkerEventsImpl(this);
void $dom_addEventListener(type, listener, [useCapture = _null]) {
Anton Muhin 2012/07/02 10:49:48 those methods are apparently can be inherited from
podivilov 2012/07/02 17:08:18 Why should we bother eliminating inherited methods
Anton Muhin 2012/07/02 17:14:10 To reduce the size of the snapshot? Do you know e
podivilov 2012/07/03 11:40:45 Uint8Array vs. Uint8ClampedArray :)
Anton Muhin 2012/07/03 12:20:51 Yes, but I am not sure this applies to EventTarget
if (useCapture === _null) {
@@ -229,8 +226,8 @@ class _AudioChannelSplitterImpl extends _AudioNodeImpl implements AudioChannelSp
class _AudioContextEventsImpl extends _EventsImpl implements AudioContextEvents {
_AudioContextEventsImpl(_ptr) : super(_ptr);
- EventListenerList get complete() => this['complete'];
+ EventListenerList get complete() => this['complete'];
}
// 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
@@ -239,12 +236,9 @@ class _AudioContextEventsImpl extends _EventsImpl implements AudioContextEvents
// WARNING: Do not edit - generated code.
class _AudioContextImpl extends _EventTargetImpl implements AudioContext {
- _EventsImpl _on;
- _AudioContextEventsImpl get on() {
- if (_on === null) _on = new _AudioContextEventsImpl(this);
- return _on;
- }
+ _AudioContextEventsImpl get on() =>
+ new _AudioContextEventsImpl(this);
int get activeSourceCount() native "AudioContext_activeSourceCount_Getter";
@@ -555,11 +549,14 @@ class _BarInfoImpl extends NativeFieldWrapperClass1 implements BarInfo {
class _BatteryManagerEventsImpl extends _EventsImpl implements BatteryManagerEvents {
_BatteryManagerEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get chargingChange() => this['chargingchange'];
+
EventListenerList get chargingTimeChange() => this['chargingtimechange'];
+
EventListenerList get dischargingTimeChange() => this['dischargingtimechange'];
- EventListenerList get levelChange() => this['levelchange'];
+ EventListenerList get levelChange() => this['levelchange'];
}
// 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
@@ -567,13 +564,10 @@ class _BatteryManagerEventsImpl extends _EventsImpl implements BatteryManagerEve
// WARNING: Do not edit - generated code.
-class _BatteryManagerImpl extends NativeFieldWrapperClass1 implements BatteryManager {
- _EventsImpl _on;
+class _BatteryManagerImpl extends _EventTargetImpl implements BatteryManager {
- _BatteryManagerEventsImpl get on() {
- if (_on === null) _on = new _BatteryManagerEventsImpl(this);
- return _on;
- }
+ _BatteryManagerEventsImpl get on() =>
+ new _BatteryManagerEventsImpl(this);
bool get charging() native "BatteryManager_charging_Getter";
@@ -4518,15 +4512,22 @@ class _CustomEventImpl extends _EventImpl implements CustomEvent {
class _DOMApplicationCacheEventsImpl extends _EventsImpl implements DOMApplicationCacheEvents {
_DOMApplicationCacheEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get cached() => this['cached'];
+
EventListenerList get checking() => this['checking'];
+
EventListenerList get downloading() => this['downloading'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get noUpdate() => this['noupdate'];
+
EventListenerList get obsolete() => this['obsolete'];
+
EventListenerList get progress() => this['progress'];
- EventListenerList get updateReady() => this['updateready'];
+ EventListenerList get updateReady() => this['updateready'];
}
// 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
@@ -4534,13 +4535,10 @@ class _DOMApplicationCacheEventsImpl extends _EventsImpl implements DOMApplicati
// WARNING: Do not edit - generated code.
-class _DOMApplicationCacheImpl extends NativeFieldWrapperClass1 implements DOMApplicationCache {
- _EventsImpl _on;
+class _DOMApplicationCacheImpl extends _EventTargetImpl implements DOMApplicationCache {
- _DOMApplicationCacheEventsImpl get on() {
- if (_on === null) _on = new _DOMApplicationCacheEventsImpl(this);
- return _on;
- }
+ _DOMApplicationCacheEventsImpl get on() =>
+ new _DOMApplicationCacheEventsImpl(this);
int get status() native "DOMApplicationCache_status_Getter";
@@ -4978,88 +4976,162 @@ class _DOMURLImpl extends NativeFieldWrapperClass1 implements DOMURL {
}
-class _DOMWindowEventsImpl extends _EventsImpl implements WindowEvents {
- _DOMWindowEventsImpl(_ptr) : super(_ptr);
+class _WindowEventsImpl extends _EventsImpl implements WindowEvents {
+ _WindowEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get animationEnd() => this['webkitAnimationEnd'];
+
EventListenerList get animationIteration() => this['webkitAnimationIteration'];
+
EventListenerList get animationStart() => this['webkitAnimationStart'];
+
EventListenerList get beforeUnload() => this['beforeunload'];
+
EventListenerList get blur() => this['blur'];
+
EventListenerList get canPlay() => this['canplay'];
+
EventListenerList get canPlayThrough() => this['canplaythrough'];
+
EventListenerList get change() => this['change'];
+
EventListenerList get click() => this['click'];
+
+ EventListenerList get contentLoaded() => this['DOMContentLoaded'];
Anton Muhin 2012/07/02 10:49:48 why we got this added? Do we really need it given
podivilov 2012/07/02 17:08:18 It's a result of unforking. Dart2js has them, so s
+
EventListenerList get contextMenu() => this['contextmenu'];
+
EventListenerList get deviceMotion() => this['devicemotion'];
+
EventListenerList get deviceOrientation() => this['deviceorientation'];
+
EventListenerList get doubleClick() => this['dblclick'];
+
EventListenerList get drag() => this['drag'];
+
EventListenerList get dragEnd() => this['dragend'];
+
EventListenerList get dragEnter() => this['dragenter'];
+
EventListenerList get dragLeave() => this['dragleave'];
+
EventListenerList get dragOver() => this['dragover'];
+
EventListenerList get dragStart() => this['dragstart'];
+
EventListenerList get drop() => this['drop'];
+
EventListenerList get durationChange() => this['durationchange'];
+
EventListenerList get emptied() => this['emptied'];
+
EventListenerList get ended() => this['ended'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get focus() => this['focus'];
+
EventListenerList get hashChange() => this['hashchange'];
+
EventListenerList get input() => this['input'];
+
EventListenerList get invalid() => this['invalid'];
+
EventListenerList get keyDown() => this['keydown'];
+
EventListenerList get keyPress() => this['keypress'];
+
EventListenerList get keyUp() => this['keyup'];
+
EventListenerList get load() => this['load'];
+
EventListenerList get loadStart() => this['loadstart'];
+
EventListenerList get loadedData() => this['loadeddata'];
+
EventListenerList get loadedMetadata() => this['loadedmetadata'];
+
EventListenerList get message() => this['message'];
+
EventListenerList get mouseDown() => this['mousedown'];
+
EventListenerList get mouseMove() => this['mousemove'];
+
EventListenerList get mouseOut() => this['mouseout'];
+
EventListenerList get mouseOver() => this['mouseover'];
+
EventListenerList get mouseUp() => this['mouseup'];
+
EventListenerList get mouseWheel() => this['mousewheel'];
+
EventListenerList get offline() => this['offline'];
+
EventListenerList get online() => this['online'];
+
EventListenerList get pageHide() => this['pagehide'];
+
EventListenerList get pageShow() => this['pageshow'];
+
EventListenerList get pause() => this['pause'];
+
EventListenerList get play() => this['play'];
+
EventListenerList get playing() => this['playing'];
+
EventListenerList get popState() => this['popstate'];
+
EventListenerList get progress() => this['progress'];
+
EventListenerList get rateChange() => this['ratechange'];
+
EventListenerList get reset() => this['reset'];
+
EventListenerList get resize() => this['resize'];
+
EventListenerList get scroll() => this['scroll'];
+
EventListenerList get search() => this['search'];
+
EventListenerList get seeked() => this['seeked'];
+
EventListenerList get seeking() => this['seeking'];
+
EventListenerList get select() => this['select'];
+
EventListenerList get stalled() => this['stalled'];
+
EventListenerList get storage() => this['storage'];
+
EventListenerList get submit() => this['submit'];
+
EventListenerList get suspend() => this['suspend'];
+
EventListenerList get timeUpdate() => this['timeupdate'];
+
EventListenerList get touchCancel() => this['touchcancel'];
+
EventListenerList get touchEnd() => this['touchend'];
+
EventListenerList get touchMove() => this['touchmove'];
+
EventListenerList get touchStart() => this['touchstart'];
+
EventListenerList get transitionEnd() => this['webkitTransitionEnd'];
+
EventListenerList get unload() => this['unload'];
+
EventListenerList get volumeChange() => this['volumechange'];
- EventListenerList get waiting() => this['waiting'];
+ EventListenerList get waiting() => this['waiting'];
}
// 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.
-class _DOMWindowImpl extends NativeFieldWrapperClass1 implements Window {
+class _DOMWindowImpl extends _EventTargetImpl implements Window {
void requestLayoutFrame(TimeoutHandler callback) {
_addMeasurementFrameCallback(callback);
@@ -5072,12 +5144,9 @@ class _DOMWindowImpl extends NativeFieldWrapperClass1 implements Window {
IDBFactory get indexedDB() => webkitIndexedDB;
- _EventsImpl _on;
- _DOMWindowEventsImpl get on() {
- if (_on === null) _on = new _DOMWindowEventsImpl(this);
- return _on;
- }
+ _WindowEventsImpl get on() =>
+ new _WindowEventsImpl(this);
DOMApplicationCache get applicationCache() native "DOMWindow_applicationCache_Getter";
@@ -5526,8 +5595,8 @@ class _DatabaseSyncImpl extends NativeFieldWrapperClass1 implements DatabaseSync
class _DedicatedWorkerContextEventsImpl extends _WorkerContextEventsImpl implements DedicatedWorkerContextEvents {
_DedicatedWorkerContextEventsImpl(_ptr) : super(_ptr);
- EventListenerList get message() => this['message'];
+ 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
@@ -5537,10 +5606,8 @@ class _DedicatedWorkerContextEventsImpl extends _WorkerContextEventsImpl impleme
class _DedicatedWorkerContextImpl extends _WorkerContextImpl implements DedicatedWorkerContext {
- _DedicatedWorkerContextEventsImpl get on() {
- if (_on === null) _on = new _DedicatedWorkerContextEventsImpl(this);
- return _on;
- }
+ _DedicatedWorkerContextEventsImpl get on() =>
+ new _DedicatedWorkerContextEventsImpl(this);
void postMessage(Object message, [List messagePorts = null]) native "DedicatedWorkerContext_postMessage_Callback";
@@ -5569,13 +5636,18 @@ class _DeprecatedPeerConnectionFactoryProvider {
class _DeprecatedPeerConnectionEventsImpl extends _EventsImpl implements DeprecatedPeerConnectionEvents {
_DeprecatedPeerConnectionEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get addStream() => this['addstream'];
+
EventListenerList get connecting() => this['connecting'];
+
EventListenerList get message() => this['message'];
+
EventListenerList get open() => this['open'];
+
EventListenerList get removeStream() => this['removestream'];
- EventListenerList get stateChange() => this['statechange'];
+ 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
@@ -5583,13 +5655,10 @@ class _DeprecatedPeerConnectionEventsImpl extends _EventsImpl implements Depreca
// WARNING: Do not edit - generated code.
-class _DeprecatedPeerConnectionImpl extends NativeFieldWrapperClass1 implements DeprecatedPeerConnection {
- _EventsImpl _on;
+class _DeprecatedPeerConnectionImpl extends _EventTargetImpl implements DeprecatedPeerConnection {
- _DeprecatedPeerConnectionEventsImpl get on() {
- if (_on === null) _on = new _DeprecatedPeerConnectionEventsImpl(this);
- return _on;
- }
+ _DeprecatedPeerConnectionEventsImpl get on() =>
+ new _DeprecatedPeerConnectionEventsImpl(this);
MediaStreamList get localStreams() native "DeprecatedPeerConnection_localStreams_Getter";
@@ -6065,10 +6134,8 @@ class _DocumentFragmentImpl extends _NodeImpl implements DocumentFragment {
}
- _ElementEventsImpl get on() {
- if (_on === null) _on = new _ElementEventsImpl(this);
- return _on;
- }
+ _ElementEventsImpl get on() =>
+ new _ElementEventsImpl(this);
Element $dom_querySelector(String selectors) native "DocumentFragment_querySelector_Callback";
@@ -6076,58 +6143,106 @@ class _DocumentFragmentImpl extends _NodeImpl implements DocumentFragment {
}
-class _DocumentEventsImpl extends _EventsImpl implements DocumentEvents {
+class _DocumentEventsImpl extends _ElementEventsImpl implements DocumentEvents {
_DocumentEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get beforeCopy() => this['beforecopy'];
+
EventListenerList get beforeCut() => this['beforecut'];
+
EventListenerList get beforePaste() => this['beforepaste'];
+
EventListenerList get blur() => this['blur'];
+
EventListenerList get change() => this['change'];
+
EventListenerList get click() => this['click'];
+
EventListenerList get contextMenu() => this['contextmenu'];
+
EventListenerList get copy() => this['copy'];
+
EventListenerList get cut() => this['cut'];
+
EventListenerList get doubleClick() => this['dblclick'];
+
EventListenerList get drag() => this['drag'];
+
EventListenerList get dragEnd() => this['dragend'];
+
EventListenerList get dragEnter() => this['dragenter'];
+
EventListenerList get dragLeave() => this['dragleave'];
+
EventListenerList get dragOver() => this['dragover'];
+
EventListenerList get dragStart() => this['dragstart'];
+
EventListenerList get drop() => this['drop'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get focus() => this['focus'];
+
EventListenerList get fullscreenChange() => this['webkitfullscreenchange'];
+
EventListenerList get fullscreenError() => this['webkitfullscreenerror'];
+
EventListenerList get input() => this['input'];
+
EventListenerList get invalid() => this['invalid'];
+
EventListenerList get keyDown() => this['keydown'];
+
EventListenerList get keyPress() => this['keypress'];
+
EventListenerList get keyUp() => this['keyup'];
+
EventListenerList get load() => this['load'];
+
EventListenerList get mouseDown() => this['mousedown'];
+
EventListenerList get mouseMove() => this['mousemove'];
+
EventListenerList get mouseOut() => this['mouseout'];
+
EventListenerList get mouseOver() => this['mouseover'];
+
EventListenerList get mouseUp() => this['mouseup'];
+
EventListenerList get mouseWheel() => this['mousewheel'];
+
EventListenerList get paste() => this['paste'];
+
EventListenerList get pointerLockChange() => this['webkitpointerlockchange'];
+
EventListenerList get pointerLockError() => this['webkitpointerlockerror'];
+
EventListenerList get readyStateChange() => this['readystatechange'];
+
EventListenerList get reset() => this['reset'];
+
EventListenerList get scroll() => this['scroll'];
+
EventListenerList get search() => this['search'];
+
EventListenerList get select() => this['select'];
+
EventListenerList get selectStart() => this['selectstart'];
+
EventListenerList get selectionChange() => this['selectionchange'];
+
EventListenerList get submit() => this['submit'];
+
EventListenerList get touchCancel() => this['touchcancel'];
+
EventListenerList get touchEnd() => this['touchend'];
+
EventListenerList get touchMove() => this['touchmove'];
- EventListenerList get touchStart() => this['touchstart'];
+ EventListenerList get touchStart() => this['touchstart'];
}
// 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
@@ -6137,10 +6252,8 @@ class _DocumentImpl extends _NodeImpl implements Document
{
- _DocumentEventsImpl get on() {
- if (_on === null) _on = new _DocumentEventsImpl(this);
- return _on;
- }
+ _DocumentEventsImpl get on() =>
+ new _DocumentEventsImpl(this);
Element get body() native "Document_body_Getter";
@@ -6338,55 +6451,102 @@ class _EXTTextureFilterAnisotropicImpl extends NativeFieldWrapperClass1 implemen
class _ElementEventsImpl extends _EventsImpl implements ElementEvents {
_ElementEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get beforeCopy() => this['beforecopy'];
+
EventListenerList get beforeCut() => this['beforecut'];
+
EventListenerList get beforePaste() => this['beforepaste'];
+
EventListenerList get blur() => this['blur'];
+
EventListenerList get change() => this['change'];
+
EventListenerList get click() => this['click'];
+
EventListenerList get contextMenu() => this['contextmenu'];
+
EventListenerList get copy() => this['copy'];
+
EventListenerList get cut() => this['cut'];
+
EventListenerList get doubleClick() => this['dblclick'];
+
EventListenerList get drag() => this['drag'];
+
EventListenerList get dragEnd() => this['dragend'];
+
EventListenerList get dragEnter() => this['dragenter'];
+
EventListenerList get dragLeave() => this['dragleave'];
+
EventListenerList get dragOver() => this['dragover'];
+
EventListenerList get dragStart() => this['dragstart'];
+
EventListenerList get drop() => this['drop'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get focus() => this['focus'];
+
EventListenerList get fullscreenChange() => this['webkitfullscreenchange'];
+
EventListenerList get fullscreenError() => this['webkitfullscreenerror'];
+
EventListenerList get input() => this['input'];
+
EventListenerList get invalid() => this['invalid'];
+
EventListenerList get keyDown() => this['keydown'];
+
EventListenerList get keyPress() => this['keypress'];
+
EventListenerList get keyUp() => this['keyup'];
+
EventListenerList get load() => this['load'];
+
EventListenerList get mouseDown() => this['mousedown'];
+
EventListenerList get mouseMove() => this['mousemove'];
+
EventListenerList get mouseOut() => this['mouseout'];
+
EventListenerList get mouseOver() => this['mouseover'];
+
EventListenerList get mouseUp() => this['mouseup'];
+
EventListenerList get mouseWheel() => this['mousewheel'];
+
EventListenerList get paste() => this['paste'];
+
EventListenerList get reset() => this['reset'];
+
EventListenerList get scroll() => this['scroll'];
+
EventListenerList get search() => this['search'];
+
EventListenerList get select() => this['select'];
+
EventListenerList get selectStart() => this['selectstart'];
+
EventListenerList get submit() => this['submit'];
+
EventListenerList get touchCancel() => this['touchcancel'];
+
EventListenerList get touchEnd() => this['touchend'];
+
EventListenerList get touchEnter() => this['touchenter'];
+
EventListenerList get touchLeave() => this['touchleave'];
+
EventListenerList get touchMove() => this['touchmove'];
+
EventListenerList get touchStart() => this['touchstart'];
- EventListenerList get transitionEnd() => this['webkitTransitionEnd'];
+ 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
@@ -7110,10 +7270,8 @@ class _ElementImpl extends _NodeImpl implements Element {
new Completer<CSSStyleDeclaration>());
}
- _ElementEventsImpl get on() {
- if (_on === null) _on = new _ElementEventsImpl(this);
- return _on;
- }
+ _ElementEventsImpl get on() =>
+ new _ElementEventsImpl(this);
int get $dom_childElementCount() native "Element_childElementCount_Getter";
@@ -7488,10 +7646,12 @@ class _EventSourceFactoryProvider {
class _EventSourceEventsImpl extends _EventsImpl implements EventSourceEvents {
_EventSourceEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get error() => this['error'];
+
EventListenerList get message() => this['message'];
- EventListenerList get open() => this['open'];
+ 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
@@ -7499,13 +7659,10 @@ class _EventSourceEventsImpl extends _EventsImpl implements EventSourceEvents {
// WARNING: Do not edit - generated code.
-class _EventSourceImpl extends NativeFieldWrapperClass1 implements EventSource {
- _EventsImpl _on;
+class _EventSourceImpl extends _EventTargetImpl implements EventSource {
- _EventSourceEventsImpl get on() {
- if (_on === null) _on = new _EventSourceEventsImpl(this);
- return _on;
- }
+ _EventSourceEventsImpl get on() =>
+ new _EventSourceEventsImpl(this);
String get URL() native "EventSource_URL_Getter";
@@ -7547,42 +7704,36 @@ class _EventSourceImpl extends NativeFieldWrapperClass1 implements EventSource {
// BSD-style license that can be found in the LICENSE file.
class _EventsImpl implements Events {
- // TODO(podivilov): add type.
- final _ptr;
-
- final Map<String, EventListenerList> _listenerMap;
+ /* Raw event target. */
+ // TODO(jacobr): it would be nice if we could specify this as
+ // _EventTargetImpl or EventTarget
+ final Dynamic _ptr;
- _EventsImpl(this._ptr) : _listenerMap = <EventListenerList>{};
+ _EventsImpl(this._ptr);
- EventListenerList operator [](String type) {
- return _listenerMap.putIfAbsent(type,
- () => new _EventListenerListImpl(_ptr, type));
+ _EventListenerListImpl operator [](String type) {
+ return new _EventListenerListImpl(_ptr, type);
}
}
-class _EventListenerWrapper {
- final EventListener raw;
- final Function wrapped;
- final bool useCapture;
- _EventListenerWrapper(this.raw, this.wrapped, this.useCapture);
-}
-
class _EventListenerListImpl implements EventListenerList {
- // TODO(podivilov): add type.
- final _ptr;
+
+ // TODO(jacobr): make this _EventTargetImpl
+ final Dynamic _ptr;
final String _type;
- List<_EventListenerWrapper> _wrappers;
- _EventListenerListImpl(this._ptr, this._type) :
- // TODO(jacobr): switch to <_EventListenerWrapper>[] when the VM allow it.
- _wrappers = new List<_EventListenerWrapper>();
+ _EventListenerListImpl(this._ptr, this._type);
- EventListenerList add(EventListener listener, [bool useCapture = false]) {
+ // TODO(jacobr): implement equals.
+
+ _EventListenerListImpl add(EventListener listener,
+ [bool useCapture = false]) {
_add(listener, useCapture);
return this;
}
- EventListenerList remove(EventListener listener, [bool useCapture = false]) {
+ _EventListenerListImpl remove(EventListener listener,
+ [bool useCapture = false]) {
_remove(listener, useCapture);
return this;
}
@@ -7595,56 +7746,18 @@ class _EventListenerListImpl implements EventListenerList {
}
void _add(EventListener listener, bool useCapture) {
- _ptr.$dom_addEventListener(_type,
- _findOrAddWrapper(listener, useCapture),
- useCapture);
+ _ptr.$dom_addEventListener(_type, listener, useCapture);
}
void _remove(EventListener listener, bool useCapture) {
- Function wrapper = _removeWrapper(listener, useCapture);
- if (wrapper !== null) {
- _ptr.$dom_removeEventListener(_type, wrapper, useCapture);
- }
- }
-
- Function _removeWrapper(EventListener listener, bool useCapture) {
- if (_wrappers === null) {
- return null;
- }
- for (int i = 0; i < _wrappers.length; i++) {
- _EventListenerWrapper wrapper = _wrappers[i];
- if (wrapper.raw === listener && wrapper.useCapture == useCapture) {
- // Order doesn't matter so we swap with the last element instead of
- // performing a more expensive remove from the middle of the list.
- if (i + 1 != _wrappers.length) {
- _wrappers[i] = _wrappers.removeLast();
- } else {
- _wrappers.removeLast();
- }
- return wrapper.wrapped;
- }
- }
- return null;
- }
-
- Function _findOrAddWrapper(EventListener listener, bool useCapture) {
- if (_wrappers === null) {
- _wrappers = <_EventListenerWrapper>[];
- } else {
- for (_EventListenerWrapper wrapper in _wrappers) {
- if (wrapper.raw === listener && wrapper.useCapture == useCapture) {
- return wrapper.wrapped;
- }
- }
- }
- final wrapped = (e) { listener(e); };
- _wrappers.add(new _EventListenerWrapper(listener, wrapped, useCapture));
- return wrapped;
+ _ptr.$dom_removeEventListener(_type, listener, useCapture);
}
}
+
class _EventTargetImpl extends NativeFieldWrapperClass1 implements EventTarget {
-/*
+
+ Events get on() => new _EventsImpl(this);
void $dom_addEventListener(type, listener, [useCapture = _null]) {
if (useCapture === _null) {
@@ -7672,7 +7785,6 @@ class _EventTargetImpl extends NativeFieldWrapperClass1 implements EventTarget {
void _removeEventListener_2(type, listener, useCapture) native "EventTarget_removeEventListener_2_Callback";
-*/
}
// 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
@@ -7849,13 +7961,18 @@ class _FileReaderFactoryProvider {
class _FileReaderEventsImpl extends _EventsImpl implements FileReaderEvents {
_FileReaderEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get load() => this['load'];
+
EventListenerList get loadEnd() => this['loadend'];
+
EventListenerList get loadStart() => this['loadstart'];
- EventListenerList get progress() => this['progress'];
+ EventListenerList get progress() => this['progress'];
}
// 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
@@ -7863,13 +7980,10 @@ class _FileReaderEventsImpl extends _EventsImpl implements FileReaderEvents {
// WARNING: Do not edit - generated code.
-class _FileReaderImpl extends NativeFieldWrapperClass1 implements FileReader {
- _EventsImpl _on;
+class _FileReaderImpl extends _EventTargetImpl implements FileReader {
- _FileReaderEventsImpl get on() {
- if (_on === null) _on = new _FileReaderEventsImpl(this);
- return _on;
- }
+ _FileReaderEventsImpl get on() =>
+ new _FileReaderEventsImpl(this);
FileError get error() native "FileReader_error_Getter";
@@ -7961,13 +8075,18 @@ class _FileReaderSyncImpl extends NativeFieldWrapperClass1 implements FileReader
class _FileWriterEventsImpl extends _EventsImpl implements FileWriterEvents {
_FileWriterEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get progress() => this['progress'];
+
EventListenerList get write() => this['write'];
+
EventListenerList get writeEnd() => this['writeend'];
- EventListenerList get writeStart() => this['writestart'];
+ EventListenerList get writeStart() => this['writestart'];
}
// 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
@@ -7975,13 +8094,10 @@ class _FileWriterEventsImpl extends _EventsImpl implements FileWriterEvents {
// WARNING: Do not edit - generated code.
-class _FileWriterImpl extends NativeFieldWrapperClass1 implements FileWriter {
- _EventsImpl _on;
+class _FileWriterImpl extends _EventTargetImpl implements FileWriter {
- _FileWriterEventsImpl get on() {
- if (_on === null) _on = new _FileWriterEventsImpl(this);
- return _on;
- }
+ _FileWriterEventsImpl get on() =>
+ new _FileWriterEventsImpl(this);
FileError get error() native "FileWriter_error_Getter";
@@ -8560,22 +8676,34 @@ class _HTMLBaseFontElementImpl extends _HTMLElementImpl implements BaseFontEleme
}
-class _HTMLBodyElementEventsImpl extends _ElementEventsImpl implements BodyElementEvents {
- _HTMLBodyElementEventsImpl(_ptr) : super(_ptr);
+class _BodyElementEventsImpl extends _ElementEventsImpl implements BodyElementEvents {
+ _BodyElementEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get beforeUnload() => this['beforeunload'];
+
EventListenerList get blur() => this['blur'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get focus() => this['focus'];
+
EventListenerList get hashChange() => this['hashchange'];
+
EventListenerList get load() => this['load'];
+
EventListenerList get message() => this['message'];
+
EventListenerList get offline() => this['offline'];
+
EventListenerList get online() => this['online'];
+
EventListenerList get popState() => this['popstate'];
+
EventListenerList get resize() => this['resize'];
+
EventListenerList get storage() => this['storage'];
- EventListenerList get unload() => this['unload'];
+ EventListenerList get unload() => this['unload'];
}
// 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
@@ -8585,10 +8713,8 @@ class _HTMLBodyElementEventsImpl extends _ElementEventsImpl implements BodyEleme
class _HTMLBodyElementImpl extends _HTMLElementImpl implements BodyElement {
- _HTMLBodyElementEventsImpl get on() {
- if (_on === null) _on = new _HTMLBodyElementEventsImpl(this);
- return _on;
- }
+ _BodyElementEventsImpl get on() =>
+ new _BodyElementEventsImpl(this);
String get aLink() native "HTMLBodyElement_aLink_Getter";
@@ -9135,22 +9261,34 @@ class _HTMLFrameElementImpl extends _HTMLElementImpl implements FrameElement {
}
-class _HTMLFrameSetElementEventsImpl extends _ElementEventsImpl implements FrameSetElementEvents {
- _HTMLFrameSetElementEventsImpl(_ptr) : super(_ptr);
+class _FrameSetElementEventsImpl extends _ElementEventsImpl implements FrameSetElementEvents {
+ _FrameSetElementEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get beforeUnload() => this['beforeunload'];
+
EventListenerList get blur() => this['blur'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get focus() => this['focus'];
+
EventListenerList get hashChange() => this['hashchange'];
+
EventListenerList get load() => this['load'];
+
EventListenerList get message() => this['message'];
+
EventListenerList get offline() => this['offline'];
+
EventListenerList get online() => this['online'];
+
EventListenerList get popState() => this['popstate'];
+
EventListenerList get resize() => this['resize'];
+
EventListenerList get storage() => this['storage'];
- EventListenerList get unload() => this['unload'];
+ EventListenerList get unload() => this['unload'];
}
// 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
@@ -9160,10 +9298,8 @@ class _HTMLFrameSetElementEventsImpl extends _ElementEventsImpl implements Frame
class _HTMLFrameSetElementImpl extends _HTMLElementImpl implements FrameSetElement {
- _HTMLFrameSetElementEventsImpl get on() {
- if (_on === null) _on = new _HTMLFrameSetElementEventsImpl(this);
- return _on;
- }
+ _FrameSetElementEventsImpl get on() =>
+ new _FrameSetElementEventsImpl(this);
String get cols() native "HTMLFrameSetElement_cols_Getter";
@@ -9369,10 +9505,10 @@ class _HTMLImageElementImpl extends _HTMLElementImpl implements ImageElement {
}
-class _HTMLInputElementEventsImpl extends _ElementEventsImpl implements InputElementEvents {
- _HTMLInputElementEventsImpl(_ptr) : super(_ptr);
- EventListenerList get speechChange() => this['webkitSpeechChange'];
+class _InputElementEventsImpl extends _ElementEventsImpl implements InputElementEvents {
+ _InputElementEventsImpl(_ptr) : super(_ptr);
+ EventListenerList get speechChange() => this['webkitSpeechChange'];
}
// 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
@@ -9382,10 +9518,8 @@ class _HTMLInputElementEventsImpl extends _ElementEventsImpl implements InputEle
class _HTMLInputElementImpl extends _HTMLElementImpl implements InputElement {
- _HTMLInputElementEventsImpl get on() {
- if (_on === null) _on = new _HTMLInputElementEventsImpl(this);
- return _on;
- }
+ _InputElementEventsImpl get on() =>
+ new _InputElementEventsImpl(this);
String get accept() native "HTMLInputElement_accept_Getter";
@@ -9818,16 +9952,22 @@ class _HTMLMarqueeElementImpl extends _HTMLElementImpl implements MarqueeElement
}
-class _HTMLMediaElementEventsImpl extends _ElementEventsImpl implements MediaElementEvents {
- _HTMLMediaElementEventsImpl(_ptr) : super(_ptr);
+class _MediaElementEventsImpl extends _ElementEventsImpl implements MediaElementEvents {
+ _MediaElementEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get keyAdded() => this['webkitkeyadded'];
+
EventListenerList get keyError() => this['webkitkeyerror'];
+
EventListenerList get keyMessage() => this['webkitkeymessage'];
+
EventListenerList get needKey() => this['webkitneedkey'];
+
EventListenerList get sourceClose() => this['webkitsourceclose'];
+
EventListenerList get sourceEnded() => this['webkitsourceended'];
- EventListenerList get sourceOpen() => this['webkitsourceopen'];
+ EventListenerList get sourceOpen() => this['webkitsourceopen'];
}
// 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
@@ -9837,10 +9977,8 @@ class _HTMLMediaElementEventsImpl extends _ElementEventsImpl implements MediaEle
class _HTMLMediaElementImpl extends _HTMLElementImpl implements MediaElement {
- _HTMLMediaElementEventsImpl get on() {
- if (_on === null) _on = new _HTMLMediaElementEventsImpl(this);
- return _on;
- }
+ _MediaElementEventsImpl get on() =>
+ new _MediaElementEventsImpl(this);
bool get autoplay() native "HTMLMediaElement_autoplay_Getter";
@@ -11173,10 +11311,12 @@ class _IDBDatabaseExceptionImpl extends NativeFieldWrapperClass1 implements IDBD
class _IDBDatabaseEventsImpl extends _EventsImpl implements IDBDatabaseEvents {
_IDBDatabaseEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get error() => this['error'];
- EventListenerList get versionChange() => this['versionchange'];
+ EventListenerList get versionChange() => this['versionchange'];
}
// 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
@@ -11184,13 +11324,10 @@ class _IDBDatabaseEventsImpl extends _EventsImpl implements IDBDatabaseEvents {
// WARNING: Do not edit - generated code.
-class _IDBDatabaseImpl extends NativeFieldWrapperClass1 implements IDBDatabase {
- _EventsImpl _on;
+class _IDBDatabaseImpl extends _EventTargetImpl implements IDBDatabase {
- _IDBDatabaseEventsImpl get on() {
- if (_on === null) _on = new _IDBDatabaseEventsImpl(this);
- return _on;
- }
+ _IDBDatabaseEventsImpl get on() =>
+ new _IDBDatabaseEventsImpl(this);
String get name() native "IDBDatabase_name_Getter";
@@ -11648,9 +11785,10 @@ class _IDBObjectStoreImpl extends NativeFieldWrapperClass1 implements IDBObjectS
class _IDBRequestEventsImpl extends _EventsImpl implements IDBRequestEvents {
_IDBRequestEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get error() => this['error'];
- EventListenerList get success() => this['success'];
+ EventListenerList get success() => this['success'];
}
// 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
@@ -11658,13 +11796,10 @@ class _IDBRequestEventsImpl extends _EventsImpl implements IDBRequestEvents {
// WARNING: Do not edit - generated code.
-class _IDBRequestImpl extends NativeFieldWrapperClass1 implements IDBRequest {
- _EventsImpl _on;
+class _IDBRequestImpl extends _EventTargetImpl implements IDBRequest {
- _IDBRequestEventsImpl get on() {
- if (_on === null) _on = new _IDBRequestEventsImpl(this);
- return _on;
- }
+ _IDBRequestEventsImpl get on() =>
+ new _IDBRequestEventsImpl(this);
DOMError get error() native "IDBRequest_error_Getter";
@@ -11710,10 +11845,12 @@ class _IDBRequestImpl extends NativeFieldWrapperClass1 implements IDBRequest {
class _IDBTransactionEventsImpl extends _EventsImpl implements IDBTransactionEvents {
_IDBTransactionEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get complete() => this['complete'];
- EventListenerList get error() => this['error'];
+ EventListenerList get error() => this['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
@@ -11721,13 +11858,10 @@ class _IDBTransactionEventsImpl extends _EventsImpl implements IDBTransactionEve
// WARNING: Do not edit - generated code.
-class _IDBTransactionImpl extends NativeFieldWrapperClass1 implements IDBTransaction {
- _EventsImpl _on;
+class _IDBTransactionImpl extends _EventTargetImpl implements IDBTransaction {
- _IDBTransactionEventsImpl get on() {
- if (_on === null) _on = new _IDBTransactionEventsImpl(this);
- return _on;
- }
+ _IDBTransactionEventsImpl get on() =>
+ new _IDBTransactionEventsImpl(this);
IDBDatabase get db() native "IDBTransaction_db_Getter";
@@ -11780,8 +11914,8 @@ class _IDBVersionChangeEventImpl extends _EventImpl implements IDBVersionChangeE
class _IDBVersionChangeRequestEventsImpl extends _IDBRequestEventsImpl implements IDBVersionChangeRequestEvents {
_IDBVersionChangeRequestEventsImpl(_ptr) : super(_ptr);
- EventListenerList get blocked() => this['blocked'];
+ EventListenerList get blocked() => this['blocked'];
}
// 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
@@ -11791,10 +11925,8 @@ class _IDBVersionChangeRequestEventsImpl extends _IDBRequestEventsImpl implement
class _IDBVersionChangeRequestImpl extends _IDBRequestImpl implements IDBVersionChangeRequest {
- _IDBVersionChangeRequestEventsImpl get on() {
- if (_on === null) _on = new _IDBVersionChangeRequestEventsImpl(this);
- return _on;
- }
+ _IDBVersionChangeRequestEventsImpl get on() =>
+ new _IDBVersionChangeRequestEventsImpl(this);
void $dom_addEventListener(type, listener, [useCapture = _null]) {
if (useCapture === _null) {
@@ -12174,8 +12306,8 @@ class _Int8ArrayImpl extends _ArrayBufferViewImpl implements Int8Array {
class _JavaScriptAudioNodeEventsImpl extends _EventsImpl implements JavaScriptAudioNodeEvents {
_JavaScriptAudioNodeEventsImpl(_ptr) : super(_ptr);
- EventListenerList get audioProcess() => this['audioprocess'];
+ EventListenerList get audioProcess() => this['audioprocess'];
}
// 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
@@ -12184,12 +12316,9 @@ class _JavaScriptAudioNodeEventsImpl extends _EventsImpl implements JavaScriptAu
// WARNING: Do not edit - generated code.
class _JavaScriptAudioNodeImpl extends _AudioNodeImpl implements JavaScriptAudioNode {
- _EventsImpl _on;
- _JavaScriptAudioNodeEventsImpl get on() {
- if (_on === null) _on = new _JavaScriptAudioNodeEventsImpl(this);
- return _on;
- }
+ _JavaScriptAudioNodeEventsImpl get on() =>
+ new _JavaScriptAudioNodeEventsImpl(this);
int get bufferSize() native "JavaScriptAudioNode_bufferSize_Getter";
@@ -12378,13 +12507,7 @@ class _MediaControllerFactoryProvider {
// WARNING: Do not edit - generated code.
-class _MediaControllerImpl extends NativeFieldWrapperClass1 implements MediaController {
- _EventsImpl _on;
-
- _EventsImpl get on() {
- if (_on === null) _on = new _EventsImpl(this);
- return _on;
- }
+class _MediaControllerImpl extends _EventTargetImpl implements MediaController {
TimeRanges get buffered() native "MediaController_buffered_Getter";
@@ -12645,8 +12768,8 @@ class _MediaStreamFactoryProvider {
class _MediaStreamEventsImpl extends _EventsImpl implements MediaStreamEvents {
_MediaStreamEventsImpl(_ptr) : super(_ptr);
- EventListenerList get ended() => this['ended'];
+ 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
@@ -12654,13 +12777,10 @@ class _MediaStreamEventsImpl extends _EventsImpl implements MediaStreamEvents {
// WARNING: Do not edit - generated code.
-class _MediaStreamImpl extends NativeFieldWrapperClass1 implements MediaStream {
- _EventsImpl _on;
+class _MediaStreamImpl extends _EventTargetImpl implements MediaStream {
- _MediaStreamEventsImpl get on() {
- if (_on === null) _on = new _MediaStreamEventsImpl(this);
- return _on;
- }
+ _MediaStreamEventsImpl get on() =>
+ new _MediaStreamEventsImpl(this);
MediaStreamTrackList get audioTracks() native "MediaStream_audioTracks_Getter";
@@ -12802,8 +12922,8 @@ class _MessageEventImpl extends _EventImpl implements MessageEvent {
class _MessagePortEventsImpl extends _EventsImpl implements MessagePortEvents {
_MessagePortEventsImpl(_ptr) : super(_ptr);
- EventListenerList get message() => this['message'];
+ 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
@@ -12811,13 +12931,10 @@ class _MessagePortEventsImpl extends _EventsImpl implements MessagePortEvents {
// WARNING: Do not edit - generated code.
-class _MessagePortImpl extends NativeFieldWrapperClass1 implements MessagePort {
- _EventsImpl _on;
+class _MessagePortImpl extends _EventTargetImpl implements MessagePort {
- _MessagePortEventsImpl get on() {
- if (_on === null) _on = new _MessagePortEventsImpl(this);
- return _on;
- }
+ _MessagePortEventsImpl get on() =>
+ new _MessagePortEventsImpl(this);
void $dom_addEventListener(type, listener, [useCapture = _null]) {
if (useCapture === _null) {
@@ -13258,7 +13375,7 @@ class _ChildNodeListLazy implements NodeList {
_NodeImpl operator[](int index) => _this.$dom_childNodes[index];
}
-class _NodeImpl extends NativeFieldWrapperClass1 implements Node {
+class _NodeImpl extends _EventTargetImpl implements Node {
_ChildNodeListLazy get nodes() {
return new _ChildNodeListLazy(this);
}
@@ -13292,12 +13409,6 @@ class _NodeImpl extends NativeFieldWrapperClass1 implements Node {
return this;
}
- _EventsImpl _on;
-
- _EventsImpl get on() {
- if (_on === null) _on = new _EventsImpl(this);
- return _on;
- }
NamedNodeMap get $dom_attributes() native "Node_attributes_Getter";
@@ -13609,12 +13720,16 @@ class _NotificationFactoryProvider {
class _NotificationEventsImpl extends _EventsImpl implements NotificationEvents {
_NotificationEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get click() => this['click'];
+
EventListenerList get close() => this['close'];
+
EventListenerList get display() => this['display'];
+
EventListenerList get error() => this['error'];
- EventListenerList get show() => this['show'];
+ 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
@@ -13622,13 +13737,10 @@ class _NotificationEventsImpl extends _EventsImpl implements NotificationEvents
// WARNING: Do not edit - generated code.
-class _NotificationImpl extends NativeFieldWrapperClass1 implements Notification {
- _EventsImpl _on;
+class _NotificationImpl extends _EventTargetImpl implements Notification {
- _NotificationEventsImpl get on() {
- if (_on === null) _on = new _NotificationEventsImpl(this);
- return _on;
- }
+ _NotificationEventsImpl get on() =>
+ new _NotificationEventsImpl(this);
String get dir() native "Notification_dir_Getter";
@@ -13798,12 +13910,16 @@ class _PeerConnection00FactoryProvider {
class _PeerConnection00EventsImpl extends _EventsImpl implements PeerConnection00Events {
_PeerConnection00EventsImpl(_ptr) : super(_ptr);
+
EventListenerList get addStream() => this['addstream'];
+
EventListenerList get connecting() => this['connecting'];
+
EventListenerList get open() => this['open'];
+
EventListenerList get removeStream() => this['removestream'];
- EventListenerList get stateChange() => this['statechange'];
+ 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
@@ -13811,13 +13927,10 @@ class _PeerConnection00EventsImpl extends _EventsImpl implements PeerConnection0
// WARNING: Do not edit - generated code.
-class _PeerConnection00Impl extends NativeFieldWrapperClass1 implements PeerConnection00 {
- _EventsImpl _on;
+class _PeerConnection00Impl extends _EventTargetImpl implements PeerConnection00 {
- _PeerConnection00EventsImpl get on() {
- if (_on === null) _on = new _PeerConnection00EventsImpl(this);
- return _on;
- }
+ _PeerConnection00EventsImpl get on() =>
+ new _PeerConnection00EventsImpl(this);
int get iceState() native "PeerConnection00_iceState_Getter";
@@ -14977,47 +15090,86 @@ class _SVGElementImpl extends _ElementImpl implements SVGElement {
class _SVGElementInstanceEventsImpl extends _EventsImpl implements SVGElementInstanceEvents {
_SVGElementInstanceEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get beforeCopy() => this['beforecopy'];
+
EventListenerList get beforeCut() => this['beforecut'];
+
EventListenerList get beforePaste() => this['beforepaste'];
+
EventListenerList get blur() => this['blur'];
+
EventListenerList get change() => this['change'];
+
EventListenerList get click() => this['click'];
+
EventListenerList get contextMenu() => this['contextmenu'];
+
EventListenerList get copy() => this['copy'];
+
EventListenerList get cut() => this['cut'];
+
EventListenerList get doubleClick() => this['dblclick'];
+
EventListenerList get drag() => this['drag'];
+
EventListenerList get dragEnd() => this['dragend'];
+
EventListenerList get dragEnter() => this['dragenter'];
+
EventListenerList get dragLeave() => this['dragleave'];
+
EventListenerList get dragOver() => this['dragover'];
+
EventListenerList get dragStart() => this['dragstart'];
+
EventListenerList get drop() => this['drop'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get focus() => this['focus'];
+
EventListenerList get input() => this['input'];
+
EventListenerList get keyDown() => this['keydown'];
+
EventListenerList get keyPress() => this['keypress'];
+
EventListenerList get keyUp() => this['keyup'];
+
EventListenerList get load() => this['load'];
+
EventListenerList get mouseDown() => this['mousedown'];
+
EventListenerList get mouseMove() => this['mousemove'];
+
EventListenerList get mouseOut() => this['mouseout'];
+
EventListenerList get mouseOver() => this['mouseover'];
+
EventListenerList get mouseUp() => this['mouseup'];
+
EventListenerList get mouseWheel() => this['mousewheel'];
+
EventListenerList get paste() => this['paste'];
+
EventListenerList get reset() => this['reset'];
+
EventListenerList get resize() => this['resize'];
+
EventListenerList get scroll() => this['scroll'];
+
EventListenerList get search() => this['search'];
+
EventListenerList get select() => this['select'];
+
EventListenerList get selectStart() => this['selectstart'];
+
EventListenerList get submit() => this['submit'];
- EventListenerList get unload() => this['unload'];
+ EventListenerList get unload() => this['unload'];
}
// 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
@@ -15026,12 +15178,9 @@ class _SVGElementInstanceEventsImpl extends _EventsImpl implements SVGElementIns
// WARNING: Do not edit - generated code.
class _SVGElementInstanceImpl extends NativeFieldWrapperClass1 implements SVGElementInstance {
- _EventsImpl _on;
- _SVGElementInstanceEventsImpl get on() {
- if (_on === null) _on = new _SVGElementInstanceEventsImpl(this);
- return _on;
- }
+ _SVGElementInstanceEventsImpl get on() =>
+ new _SVGElementInstanceEventsImpl(this);
SVGElementInstanceList get childNodes() native "SVGElementInstance_childNodes_Getter";
@@ -18208,8 +18357,8 @@ class _ShadowRootImpl extends _DocumentFragmentImpl implements ShadowRoot {
class _SharedWorkerContextEventsImpl extends _WorkerContextEventsImpl implements SharedWorkerContextEvents {
_SharedWorkerContextEventsImpl(_ptr) : super(_ptr);
- EventListenerList get connect() => this['connect'];
+ EventListenerList get connect() => this['connect'];
}
// 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
@@ -18219,10 +18368,8 @@ class _SharedWorkerContextEventsImpl extends _WorkerContextEventsImpl implements
class _SharedWorkerContextImpl extends _WorkerContextImpl implements SharedWorkerContext {
- _SharedWorkerContextEventsImpl get on() {
- if (_on === null) _on = new _SharedWorkerContextEventsImpl(this);
- return _on;
- }
+ _SharedWorkerContextEventsImpl get on() =>
+ new _SharedWorkerContextEventsImpl(this);
String get name() native "SharedWorkerContext_name_Getter";
@@ -18405,19 +18552,30 @@ class _SpeechRecognitionFactoryProvider {
class _SpeechRecognitionEventsImpl extends _EventsImpl implements SpeechRecognitionEvents {
_SpeechRecognitionEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get audioEnd() => this['audioend'];
+
EventListenerList get audioStart() => this['audiostart'];
+
EventListenerList get end() => this['end'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get noMatch() => this['nomatch'];
+
EventListenerList get result() => this['result'];
+
EventListenerList get resultDeleted() => this['resultdeleted'];
+
EventListenerList get soundEnd() => this['soundend'];
+
EventListenerList get soundStart() => this['soundstart'];
+
EventListenerList get speechEnd() => this['speechend'];
+
EventListenerList get speechStart() => this['speechstart'];
- EventListenerList get start() => this['start'];
+ EventListenerList get start() => this['start'];
}
// 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
@@ -18425,13 +18583,10 @@ class _SpeechRecognitionEventsImpl extends _EventsImpl implements SpeechRecognit
// WARNING: Do not edit - generated code.
-class _SpeechRecognitionImpl extends NativeFieldWrapperClass1 implements SpeechRecognition {
- _EventsImpl _on;
+class _SpeechRecognitionImpl extends _EventTargetImpl implements SpeechRecognition {
- _SpeechRecognitionEventsImpl get on() {
- if (_on === null) _on = new _SpeechRecognitionEventsImpl(this);
- return _on;
- }
+ _SpeechRecognitionEventsImpl get on() =>
+ new _SpeechRecognitionEventsImpl(this);
bool get continuous() native "SpeechRecognition_continuous_Getter";
@@ -18776,9 +18931,10 @@ class _TextTrackCueFactoryProvider {
class _TextTrackCueEventsImpl extends _EventsImpl implements TextTrackCueEvents {
_TextTrackCueEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get enter() => this['enter'];
- EventListenerList get exit() => this['exit'];
+ EventListenerList get exit() => this['exit'];
}
// 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
@@ -18786,13 +18942,10 @@ class _TextTrackCueEventsImpl extends _EventsImpl implements TextTrackCueEvents
// WARNING: Do not edit - generated code.
-class _TextTrackCueImpl extends NativeFieldWrapperClass1 implements TextTrackCue {
- _EventsImpl _on;
+class _TextTrackCueImpl extends _EventTargetImpl implements TextTrackCue {
- _TextTrackCueEventsImpl get on() {
- if (_on === null) _on = new _TextTrackCueEventsImpl(this);
- return _on;
- }
+ _TextTrackCueEventsImpl get on() =>
+ new _TextTrackCueEventsImpl(this);
String get align() native "TextTrackCue_align_Getter";
@@ -18887,8 +19040,8 @@ class _TextTrackCueListImpl extends NativeFieldWrapperClass1 implements TextTrac
class _TextTrackEventsImpl extends _EventsImpl implements TextTrackEvents {
_TextTrackEventsImpl(_ptr) : super(_ptr);
- EventListenerList get cueChange() => this['cuechange'];
+ EventListenerList get cueChange() => this['cuechange'];
}
// 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
@@ -18896,13 +19049,10 @@ class _TextTrackEventsImpl extends _EventsImpl implements TextTrackEvents {
// WARNING: Do not edit - generated code.
-class _TextTrackImpl extends NativeFieldWrapperClass1 implements TextTrack {
- _EventsImpl _on;
+class _TextTrackImpl extends _EventTargetImpl implements TextTrack {
- _TextTrackEventsImpl get on() {
- if (_on === null) _on = new _TextTrackEventsImpl(this);
- return _on;
- }
+ _TextTrackEventsImpl get on() =>
+ new _TextTrackEventsImpl(this);
TextTrackCueList get activeCues() native "TextTrack_activeCues_Getter";
@@ -18952,8 +19102,8 @@ class _TextTrackImpl extends NativeFieldWrapperClass1 implements TextTrack {
class _TextTrackListEventsImpl extends _EventsImpl implements TextTrackListEvents {
_TextTrackListEventsImpl(_ptr) : super(_ptr);
- EventListenerList get addTrack() => this['addtrack'];
+ EventListenerList get addTrack() => this['addtrack'];
}
// 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
@@ -18961,13 +19111,10 @@ class _TextTrackListEventsImpl extends _EventsImpl implements TextTrackListEvent
// WARNING: Do not edit - generated code.
-class _TextTrackListImpl extends NativeFieldWrapperClass1 implements TextTrackList {
- _EventsImpl _on;
+class _TextTrackListImpl extends _EventTargetImpl implements TextTrackList {
- _TextTrackListEventsImpl get on() {
- if (_on === null) _on = new _TextTrackListEventsImpl(this);
- return _on;
- }
+ _TextTrackListEventsImpl get on() =>
+ new _TextTrackListEventsImpl(this);
int get length() native "TextTrackList_length_Getter";
@@ -20519,11 +20666,14 @@ class _WebKitTransitionEventImpl extends _EventImpl implements TransitionEvent {
class _WebSocketEventsImpl extends _EventsImpl implements WebSocketEvents {
_WebSocketEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get close() => this['close'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get message() => this['message'];
- EventListenerList get open() => this['open'];
+ 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
@@ -20531,13 +20681,10 @@ class _WebSocketEventsImpl extends _EventsImpl implements WebSocketEvents {
// WARNING: Do not edit - generated code.
-class _WebSocketImpl extends NativeFieldWrapperClass1 implements WebSocket {
- _EventsImpl _on;
+class _WebSocketImpl extends _EventTargetImpl implements WebSocket {
- _WebSocketEventsImpl get on() {
- if (_on === null) _on = new _WebSocketEventsImpl(this);
- return _on;
- }
+ _WebSocketEventsImpl get on() =>
+ new _WebSocketEventsImpl(this);
String get URL() native "WebSocket_URL_Getter";
@@ -20632,8 +20779,8 @@ class _WheelEventImpl extends _UIEventImpl implements WheelEvent {
class _WorkerContextEventsImpl extends _EventsImpl implements WorkerContextEvents {
_WorkerContextEventsImpl(_ptr) : super(_ptr);
- EventListenerList get error() => this['error'];
+ EventListenerList get error() => this['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
@@ -20641,13 +20788,10 @@ class _WorkerContextEventsImpl extends _EventsImpl implements WorkerContextEvent
// WARNING: Do not edit - generated code.
-class _WorkerContextImpl extends NativeFieldWrapperClass1 implements WorkerContext {
- _EventsImpl _on;
+class _WorkerContextImpl extends _EventTargetImpl implements WorkerContext {
- _WorkerContextEventsImpl get on() {
- if (_on === null) _on = new _WorkerContextEventsImpl(this);
- return _on;
- }
+ _WorkerContextEventsImpl get on() =>
+ new _WorkerContextEventsImpl(this);
WorkerLocation get location() native "WorkerContext_location_Getter";
@@ -20721,8 +20865,8 @@ class _WorkerFactoryProvider {
class _WorkerEventsImpl extends _AbstractWorkerEventsImpl implements WorkerEvents {
_WorkerEventsImpl(_ptr) : super(_ptr);
- EventListenerList get message() => this['message'];
+ 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
@@ -20732,10 +20876,8 @@ class _WorkerEventsImpl extends _AbstractWorkerEventsImpl implements WorkerEvent
class _WorkerImpl extends _AbstractWorkerImpl implements Worker {
- _WorkerEventsImpl get on() {
- if (_on === null) _on = new _WorkerEventsImpl(this);
- return _on;
- }
+ _WorkerEventsImpl get on() =>
+ new _WorkerEventsImpl(this);
void postMessage(message, [List messagePorts = null]) native "Worker_postMessage_Callback";
@@ -20822,14 +20964,20 @@ class _XMLHttpRequestFactoryProvider {
class _XMLHttpRequestEventsImpl extends _EventsImpl implements XMLHttpRequestEvents {
_XMLHttpRequestEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get load() => this['load'];
+
EventListenerList get loadEnd() => this['loadend'];
+
EventListenerList get loadStart() => this['loadstart'];
+
EventListenerList get progress() => this['progress'];
- EventListenerList get readyStateChange() => this['readystatechange'];
+ EventListenerList get readyStateChange() => this['readystatechange'];
}
// 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
@@ -20837,13 +20985,10 @@ class _XMLHttpRequestEventsImpl extends _EventsImpl implements XMLHttpRequestEve
// WARNING: Do not edit - generated code.
-class _XMLHttpRequestImpl extends NativeFieldWrapperClass1 implements XMLHttpRequest {
- _EventsImpl _on;
+class _XMLHttpRequestImpl extends _EventTargetImpl implements XMLHttpRequest {
- _XMLHttpRequestEventsImpl get on() {
- if (_on === null) _on = new _XMLHttpRequestEventsImpl(this);
- return _on;
- }
+ _XMLHttpRequestEventsImpl get on() =>
+ new _XMLHttpRequestEventsImpl(this);
int get readyState() native "XMLHttpRequest_readyState_Getter";
@@ -20926,13 +21071,18 @@ class _XMLHttpRequestProgressEventImpl extends _ProgressEventImpl implements XML
class _XMLHttpRequestUploadEventsImpl extends _EventsImpl implements XMLHttpRequestUploadEvents {
_XMLHttpRequestUploadEventsImpl(_ptr) : super(_ptr);
+
EventListenerList get abort() => this['abort'];
+
EventListenerList get error() => this['error'];
+
EventListenerList get load() => this['load'];
+
EventListenerList get loadEnd() => this['loadend'];
+
EventListenerList get loadStart() => this['loadstart'];
- EventListenerList get progress() => this['progress'];
+ EventListenerList get progress() => this['progress'];
}
// 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
@@ -20940,13 +21090,10 @@ class _XMLHttpRequestUploadEventsImpl extends _EventsImpl implements XMLHttpRequ
// WARNING: Do not edit - generated code.
-class _XMLHttpRequestUploadImpl extends NativeFieldWrapperClass1 implements XMLHttpRequestUpload {
- _EventsImpl _on;
+class _XMLHttpRequestUploadImpl extends _EventTargetImpl implements XMLHttpRequestUpload {
- _XMLHttpRequestUploadEventsImpl get on() {
- if (_on === null) _on = new _XMLHttpRequestUploadEventsImpl(this);
- return _on;
- }
+ _XMLHttpRequestUploadEventsImpl get on() =>
+ new _XMLHttpRequestUploadEventsImpl(this);
void $dom_addEventListener(type, listener, [useCapture = _null]) {
if (useCapture === _null) {
« lib/dom/scripts/systemnative.py ('K') | « lib/dom/templates/html/impl/impl_EventTarget.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698