attachScheduledHandler function
Implementation
void attachScheduledHandler(CloudflareWorkersScheduledEvent handler) {
globalDartScheduledHandler = allowInterop((interop.ScheduledEvent event,
interop.Environment env, interop.ExecutionContext ctx) {
return futureToPromise(Future(() async {
return handler(
scheduledEventFromJsObject(event),
environmentFromJsObject(env),
executionContextFromJsObject(ctx),
);
}));
});
}