MCPcopy Create free account
hub / github.com/dcloudio/mui / CustomEvent

Function CustomEvent

js/mui.fixed.js:23–36  ·  view source on GitHub ↗
(event, params)

Source from the content-addressed store, hash-verified

21(function() {
22 if (typeof window.CustomEvent === 'undefined') {
23 function CustomEvent(event, params) {
24 params = params || {
25 bubbles: false,
26 cancelable: false,
27 detail: undefined
28 };
29 var evt = document.createEvent('Events');
30 var bubbles = true;
31 for (var name in params) {
32 (name === 'bubbles') ? (bubbles = !!params[name]) : (evt[name] = params[name]);
33 }
34 evt.initEvent(event, bubbles, true);
35 return evt;
36 };
37 CustomEvent.prototype = window.Event.prototype;
38 window.CustomEvent = CustomEvent;
39 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected