OLD | NEW |
(Empty) | |
| 1 |
| 2 class _MessagePortImpl extends _EventTargetImpl implements MessagePort native "*
MessagePort" { |
| 3 |
| 4 _MessagePortEventsImpl get on() => |
| 5 new _MessagePortEventsImpl(this); |
| 6 |
| 7 void _addEventListener(String type, EventListener listener, [bool useCapture =
null]) native "this.addEventListener(type, listener, useCapture);"; |
| 8 |
| 9 void close() native; |
| 10 |
| 11 bool _dispatchEvent(_EventImpl evt) native "return this.dispatchEvent(evt);"; |
| 12 |
| 13 void postMessage(String message, [List messagePorts = null]) native; |
| 14 |
| 15 void _removeEventListener(String type, EventListener listener, [bool useCaptur
e = null]) native "this.removeEventListener(type, listener, useCapture);"; |
| 16 |
| 17 void start() native; |
| 18 |
| 19 void webkitPostMessage(String message, [List transfer = null]) native; |
| 20 } |
| 21 |
| 22 class _MessagePortEventsImpl extends _EventsImpl implements MessagePortEvents { |
| 23 _MessagePortEventsImpl(_ptr) : super(_ptr); |
| 24 |
| 25 EventListenerList get message() => _get('message'); |
| 26 } |
OLD | NEW |