input-device-capabilities icon indicating copy to clipboard operation
input-device-capabilities copied to clipboard

Should init*Event methods clear the sourceDevice?

Open RByers opened this issue 10 years ago • 1 comments

How should this code behave?

var e = new UIEvent("test", {sourceDevice: new InputDevice()});
e.initUIEvent("test2", false, false, null, 0);
console.log(e.sourceDevice);

Although the init*Event methods are deprecated, we should probably still define (and test) this behavior. It's a pretty minor edge case though, unlikely to come up in practice I think.

RByers avatar Jul 07 '15 18:07 RByers

FWIW It looks like the prototype blink implementation does clear sourceDevice in this case.

RByers avatar Jul 07 '15 18:07 RByers