1 | /**
|
2 | * @param {?} type
|
3 | * @param {?=} detail
|
4 | * @param {?=} params
|
5 | * @return {?}
|
6 | */
|
7 | export function CustomEvent(type, detail, params) {
|
8 | if (detail === void 0) { detail = undefined; }
|
9 | if (params === void 0) { params = { bubbles: false, cancelable: false }; }
|
10 | var /** @type {?} */ event = document.createEvent('CustomEvent');
|
11 | event.initCustomEvent(type, params.bubbles, params.cancelable, detail);
|
12 | return event;
|
13 | }
|
14 | if ("Event" in window) {
|
15 | CustomEvent.prototype = ((window)).Event.prototype;
|
16 | }
|