-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Chrome seems to be currently using this:
constructor(optional WebTransportErrorInit init = {});
This allows construction with the first parameter being a dictionary, like this example from wpt:
new WebTransportError({streamErrorCode: WT_CODE}))
The current spec IDL looks like this:
constructor(optional DOMString message = "", optional WebTransportErrorOptions options = {});
This says to interpret the first parameter as a string, and if it's not a string then use the empty string, which isn't compatible with wpt or Chrome. I think we should change it to something like this:
constructor(optional WebTransportErrorOptions options = {});
constructor(DOMString message, optional WebTransportErrorOptions options = {});
This would allow us to have a dictionary as the only parameter or to have a string or a string followed by a dictionary. I'm implementing this in the initial version of WebKit/WebKit#56176