w3c / input-events

Input Events
https://w3c.github.io/input-events/
Other
23 stars 16 forks source link

Partial inteface cannot have a constructor #46

Closed foolip closed 7 years ago

foolip commented 7 years ago

https://w3c.github.io/input-events/#interface-InputEvent

[Constructor(DOMString typeArg, optional InputEventInit inputEventInitDict)]
partial interface InputEvent {
    readonly attribute DOMString     inputType;
    readonly attribute DataTransfer? dataTransfer;
    sequence<StaticRange> getTargetRanges();
};

Per https://heycam.github.io/webidl/#Constructor [Constructor] only means something for interfaces, not partial interfaces.

Instead, it'll have to be:

partial interface InputEvent {
    readonly attribute DOMString     inputType;
    readonly attribute DataTransfer? dataTransfer;
    sequence<StaticRange> getTargetRanges();
};

partial dictionary InputEventInit {
    DOMString inputType = "";
    DataTransfer? dataTransfer = null;
};

(Or similar.)

foolip commented 7 years ago

Thanks!