| Index: lib/dom/templates/html/dartium/impl_EventTarget.darttemplate
|
| diff --git a/lib/dom/templates/html/dartium/impl_EventTarget.darttemplate b/lib/dom/templates/html/dartium/impl_EventTarget.darttemplate
|
| index 18b73540d74f0d719c2ffc14627cebb2d557efb4..e64d26da8bec5aebc1392cb3eb5a2783cbe60a0b 100644
|
| --- a/lib/dom/templates/html/dartium/impl_EventTarget.darttemplate
|
| +++ b/lib/dom/templates/html/dartium/impl_EventTarget.darttemplate
|
| @@ -3,8 +3,8 @@
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| class _EventsImpl implements Events {
|
| -
|
| - final _EventTargetImpl _ptr;
|
| + // TODO(podivilov): add type.
|
| + final _ptr;
|
|
|
| final Map<String, EventListenerList> _listenerMap;
|
|
|
| @@ -13,7 +13,7 @@ class _EventsImpl implements Events {
|
| EventListenerList operator [](String type) {
|
| return _get(type.toLowerCase());
|
| }
|
| -
|
| +
|
| EventListenerList _get(String type) {
|
| return _listenerMap.putIfAbsent(type,
|
| () => new _EventListenerListImpl(_ptr, type));
|
| @@ -28,7 +28,8 @@ class _EventListenerWrapper {
|
| }
|
|
|
| class _EventListenerListImpl implements EventListenerList {
|
| - final _EventTargetImpl _ptr;
|
| + // TODO(podivilov): add type.
|
| + final _ptr;
|
| final String _type;
|
| List<_EventListenerWrapper> _wrappers;
|
|
|
| @@ -50,11 +51,11 @@ class _EventListenerListImpl implements EventListenerList {
|
| // TODO(jacobr): what is the correct behavior here. We could alternately
|
| // force the event to have the expected type.
|
| assert(evt.type == _type);
|
| - return _ptr.$dom_dispatchEvent(evt);
|
| + return _ptr.dispatchEvent(_unwrap(evt));
|
| }
|
|
|
| void _add(EventListener listener, bool useCapture) {
|
| - _ptr.$dom_addEventListener(_type,
|
| + _ptr.addEventListener(_type,
|
| _findOrAddWrapper(listener, useCapture),
|
| useCapture);
|
| }
|
| @@ -62,7 +63,7 @@ class _EventListenerListImpl implements EventListenerList {
|
| void _remove(EventListener listener, bool useCapture) {
|
| Function wrapper = _removeWrapper(listener, useCapture);
|
| if (wrapper !== null) {
|
| - _ptr.$dom_removeEventListener(_type, wrapper, useCapture);
|
| + _ptr.removeEventListener(_type, wrapper, useCapture);
|
| }
|
| }
|
|
|
|
|