Blame view

lib/jsdom/living/events/InputEvent-impl.js 590 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
22
23
  "use strict";
  
  const UIEventImpl = require("./UIEvent-impl").implementation;
  
  const InputEventInit = require("../generated/InputEventInit");
  
  // https://w3c.github.io/uievents/#interface-inputevent
  class InputEventImpl extends UIEventImpl {
    initInputEvent(type, bubbles, cancelable, data, isComposing) {
      if (this._dispatchFlag) {
        return;
      }
  
      this.initUIEvent(type, bubbles, cancelable);
      this.data = data;
      this.isComposing = isComposing;
    }
  }
  InputEventImpl.defaultInit = InputEventInit.convert(undefined);
  
  module.exports = {
    implementation: InputEventImpl
  };