Index: pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
diff --git a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
index 578a8a1cb90a8885bd00d0c144a8a23ecea4ac76..96c65a89b47950e597c7ed5fc47db4bcc5834919 100644 |
--- a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
+++ b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js |
@@ -584,6 +584,7 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
let EventStreamProviderOfDeviceOrientationEvent = () => (EventStreamProviderOfDeviceOrientationEvent = dart.constFn(html$.EventStreamProvider$(html$.DeviceOrientationEvent)))(); |
let EventStreamProviderOfAnimationEvent = () => (EventStreamProviderOfAnimationEvent = dart.constFn(html$.EventStreamProvider$(html$.AnimationEvent)))(); |
let EventStreamProviderOfBeforeUnloadEvent = () => (EventStreamProviderOfBeforeUnloadEvent = dart.constFn(html$.EventStreamProvider$(html$.BeforeUnloadEvent)))(); |
+ let _EventStreamOfBeforeUnloadEvent = () => (_EventStreamOfBeforeUnloadEvent = dart.constFn(html$._EventStream$(html$.BeforeUnloadEvent)))(); |
let StreamControllerOfBeforeUnloadEvent = () => (StreamControllerOfBeforeUnloadEvent = dart.constFn(async.StreamController$(html$.BeforeUnloadEvent)))(); |
let _ElementEventStreamImplOfBeforeUnloadEvent = () => (_ElementEventStreamImplOfBeforeUnloadEvent = dart.constFn(html$._ElementEventStreamImpl$(html$.BeforeUnloadEvent)))(); |
let _ElementListEventStreamImplOfBeforeUnloadEvent = () => (_ElementListEventStreamImplOfBeforeUnloadEvent = dart.constFn(html$._ElementListEventStreamImpl$(html$.BeforeUnloadEvent)))(); |
@@ -926,6 +927,7 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
let RtcStatsResponseTovoid = () => (RtcStatsResponseTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [html$.RtcStatsResponse])))(); |
let OptionElementTobool = () => (OptionElementTobool = dart.constFn(dart.definiteFunctionType(core.bool, [html$.OptionElement])))(); |
let numTovoid = () => (numTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.num])))(); |
+ let BeforeUnloadEventTovoid = () => (BeforeUnloadEventTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [html$.BeforeUnloadEvent])))(); |
let ElementTovoid$ = () => (ElementTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [html$.Element])))(); |
let ElementToCssClassSet = () => (ElementToCssClassSet = dart.constFn(dart.definiteFunctionType(html$.CssClassSet, [html$.Element])))(); |
let CssClassSetImplTovoid = () => (CssClassSetImplTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [html_common.CssClassSetImpl])))(); |
@@ -93235,12 +93237,12 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
} |
forTarget(e, opts) { |
let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false; |
- let stream = new (_EventStreamOfEvent())(e, this[_eventType], useCapture); |
+ let stream = new (_EventStreamOfBeforeUnloadEvent())(e, this[_eventType], useCapture); |
let controller = StreamControllerOfBeforeUnloadEvent().new({sync: true}); |
stream.listen(dart.fn(event => { |
let wrapped = new html$._BeforeUnloadEvent(event); |
controller.add(wrapped); |
- }, EventTovoid$())); |
+ }, BeforeUnloadEventTovoid())); |
return controller.stream; |
} |
getEventType(target) { |
@@ -96402,7 +96404,7 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
this[_target$0] = target; |
this[_eventType] = eventType; |
this[_useCapture] = useCapture; |
- this[_onData$0] = html$._wrapZone(html$.Event, dart.dynamic)(_wrapZoneCallbackOfEvent$dynamic()._check(onData)); |
+ this[_onData$0] = onData == null ? null : html$._wrapZone(html$.Event, dart.dynamic)(dart.fn(e => dart.dcall(onData, e), EventTodynamic())); |
this[_pauseCount$0] = 0; |
this[_tryResume](); |
} |
@@ -96453,10 +96455,12 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
this[_target$0][dartx.removeEventListener](this[_eventType], this[_onData$0], this[_useCapture]); |
} |
} |
- asFuture(futureValue) { |
- if (futureValue === void 0) futureValue = null; |
- let completer = async.Completer.new(); |
- return completer.future; |
+ asFuture(E) { |
+ return futureValue => { |
+ if (futureValue === void 0) futureValue = null; |
+ let completer = async.Completer$(E).new(); |
+ return completer.future; |
+ }; |
} |
} |
dart.setSignature(_EventStreamSubscription, { |
@@ -96481,7 +96485,7 @@ dart_library.library('dart_sdk', null, /* Imports */[ |
resume: dart.definiteFunctionType(dart.void, []), |
[_tryResume]: dart.definiteFunctionType(dart.void, []), |
[_unlisten]: dart.definiteFunctionType(dart.void, []), |
- asFuture: dart.definiteFunctionType(async.Future, [], [dart.dynamic]) |
+ asFuture: dart.definiteFunctionType(E => [async.Future$(E), [], [E]]) |
}) |
}); |
return _EventStreamSubscription; |