VulpesOS/gaia/shared/test/unit/mocks/mock_custom_event.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

26 lines
641 B
JavaScript
Executable file

'use strict';
(function(exports) {
var MockCustomEvent = function(type, eventInitDict) {
this.type = type;
if (typeof eventInitDict === 'object') {
this.bubbles = eventInitDict.bubbles;
this.cancelable = eventInitDict.cancelable;
this.detail = eventInitDict.detail;
}
return this;
};
MockCustomEvent.prototype = {
initCustomEvent:
function mce_initCustomEvent(type, canBubble, cancelable, detail) {
this.type = type;
this.bubbles = canBubble;
this.cancelable = cancelable;
this.detail = detail;
}
};
exports.MockCustomEvent = MockCustomEvent;
}(window));