w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
370 stars 42 forks source link

Remove `Extensible` for `Metadata` #482

Closed jrandolf-2 closed 1 year ago

jrandolf-2 commented 1 year ago

The Extensible mechanism makes type discrimination impossible for WebDriver Bidi. In particular, it's impossible to reduce between various productions that have common keys since Extensible is a catch-all.

To fix this, this PR introduces the Metadata type that replaces Extensible. The purpose of Metadata is well-defined and carries out the task of Extensible without polluting productions.

Fixed: https://github.com/w3c/webdriver-bidi/issues/480


Preview | Diff

jrandolf-2 commented 1 year ago

I am not sure it helps with the original issue that Extensible is likely solving (these issues look related #79 #274): as I understand it is to allow the compatibility between protocol versions, which I don't see how metadata would solve. cc @jgraham

I see. Then I think this PR is irrelevant.