@fsi-open/mock-socket
Version:
Javascript mocking library for websockets and socket.io
14 lines (12 loc) • 384 B
JavaScript
export default class EventPrototype {
// Noops
stopPropagation() {}
stopImmediatePropagation() {}
// if no arguments are passed then the type is set to "undefined" on
// chrome and safari.
initEvent(type = 'undefined', bubbles = false, cancelable = false) {
this.type = `${type}`;
this.bubbles = Boolean(bubbles);
this.cancelable = Boolean(cancelable);
}
}