Blame view

lib/jsdom/living/events/CustomEvent-impl.js 490 Bytes
858f2bdf5   Boyan Georgiev   fixes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  "use strict";
  
  const EventImpl = require("./Event-impl").implementation;
  
  const CustomEventInit = require("../generated/CustomEventInit");
  
  class CustomEventImpl extends EventImpl {
    initCustomEvent(type, bubbles, cancelable, detail) {
      if (this._dispatchFlag) {
        return;
      }
  
      this.initEvent(type, bubbles, cancelable);
      this.detail = detail;
    }
  }
  CustomEventImpl.defaultInit = CustomEventInit.convert(undefined);
  
  module.exports = {
    implementation: CustomEventImpl
  };