OLD | NEW |
(Empty) | |
| 1 |
| 2 class _AbstractWorkerImpl extends _EventTargetImpl implements AbstractWorker { |
| 3 _AbstractWorkerImpl._wrap(ptr) : super._wrap(ptr); |
| 4 |
| 5 _AbstractWorkerEventsImpl get on() { |
| 6 if (_on == null) _on = new _AbstractWorkerEventsImpl(this); |
| 7 return _on; |
| 8 } |
| 9 |
| 10 void _addEventListener(String type, EventListener listener, [bool useCapture =
null]) { |
| 11 if (useCapture === null) { |
| 12 _ptr.addEventListener(_unwrap(type), _unwrap(listener)); |
| 13 return; |
| 14 } else { |
| 15 _ptr.addEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapture
)); |
| 16 return; |
| 17 } |
| 18 } |
| 19 |
| 20 bool _dispatchEvent(Event evt) { |
| 21 return _wrap(_ptr.dispatchEvent(_unwrap(evt))); |
| 22 } |
| 23 |
| 24 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e = null]) { |
| 25 if (useCapture === null) { |
| 26 _ptr.removeEventListener(_unwrap(type), _unwrap(listener)); |
| 27 return; |
| 28 } else { |
| 29 _ptr.removeEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapt
ure)); |
| 30 return; |
| 31 } |
| 32 } |
| 33 } |
| 34 |
| 35 class _AbstractWorkerEventsImpl extends _EventsImpl implements AbstractWorkerEve
nts { |
| 36 _AbstractWorkerEventsImpl(_ptr) : super(_ptr); |
| 37 |
| 38 EventListenerList get error() => _get('error'); |
| 39 } |
OLD | NEW |