Open jrandolf opened 4 months ago
@jrandolf is it in the spec that the properties can be inferred? (could you please add a link)
@jrandolf is it in the spec that the properties can be inferred? (could you please add a link)
This is implementation-defined. See https://www.w3.org/TR/webdriver2/#dfn-dispatch-a-pointerdown-action
The defaults match the defaults if you construct an event in the DOM API, per: https://www.w3.org/TR/pointerevents/#pointer-events-and-interfaces. I think that's what's intended by classic, and saying "this is just implementation defined" is not OK (authors should be able to depend on event properties being consistent between browsers for a given input).
https://www.w3.org/TR/pointerevents/#pointer-events-and-interfaces
The defaults don't really make sense for a lot of events. For example, for pointer, the default pressure is always 0.5 (try it on any browser)
That seems like a reason to update those specs, rather than a reason to throw our hands up and say "implementation defined".
https://www.w3.org/TR/pointerevents/#pointer-events-and-interfaces
PointerEventInit
is used for custom events built from the DOM. It does not reflect what is expected from the automation side. We could take your arguments and apply them to keyboard events and etc, but this wouldn't benefit an automation user. In particular, keyboard events, e.g., allow setting the ctrl
state, but we know for automation they probably want to integrate with the browser state.
As an alternative, we can try to specify the defaults within WebDriver in detail. WDYT?
We enforce default pointer properties although the WebDriver spec does not specify any.
Preview | Diff