MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / dispatchEvent

Function dispatchEvent

static/plugins/pdfmake/pdfmake.js:42196–42207  ·  view source on GitHub ↗
(name, promise, reason)

Source from the content-addressed store, hash-verified

42194};
42195
42196var dispatchEvent = function (name, promise, reason) {
42197 var event, handler;
42198 if (DISPATCH_EVENT) {
42199 event = document.createEvent('Event');
42200 event.promise = promise;
42201 event.reason = reason;
42202 event.initEvent(name, false, true);
42203 global.dispatchEvent(event);
42204 } else event = { promise: promise, reason: reason };
42205 if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
42206 else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
42207};
42208
42209var onUnhandled = function (state) {
42210 call(task, global, function () {

Callers 2

onUnhandledFunction · 0.70
onHandleUnhandledFunction · 0.70

Calls 1

handlerFunction · 0.50

Tested by

no test coverage detected