jsdom
Version:
A JavaScript implementation of many web standards
22 lines (18 loc) • 667 B
JavaScript
;
const MouseEventImpl = require("./MouseEvent-impl").implementation;
const PointerEventInit = require("../../../generated/idl/PointerEventInit");
class PointerEventImpl extends MouseEventImpl {
getCoalescedEvents() {
// The EventImpl constructor initializes this.coalescedEvents from the init dictionary.
// Return a new array each time (webidl2js doesn't handle this for us.)
return [...this.coalescedEvents];
}
getPredictedEvents() {
// As above.
return [...this.predictedEvents];
}
}
PointerEventImpl.defaultInit = PointerEventInit.convert(undefined, undefined);
module.exports = {
implementation: PointerEventImpl
};