- From: Kai Ninomiya <notifications@github.com>
- Date: Thu, 29 Dec 2022 18:43:07 -0800
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/webidl/pull/1211/review/1232854381@github.com>
@kainino0x commented on this pull request. > + constructor dictionary, which return the values accepted by the constructor operation. +* They should be [=serializable objects=], whose [=serialization steps=] and + [=deserialization steps=] preserve the additional information. + +<p class=note>These requirements mean that the inherited {{DOMException/code}} property of these +interfaces will always return 0. + +<div class=example id=example-domexception-derived-interface> + The definition for a {{DOMException}} derived interface which carries along an additional + "protocol error code", which is derived from what the server sent over some some hypothetical + network protocol "protocol X", could look something like this: + + <pre highlight=webidl> + [Exposed=Window, Serializable] + interface ProtocolXError : DOMException { + constructor(optional DOMString message = "", ProtocolXErrorOptions options); IIUC `(DOMString or undefined) message`, with prose describing the defaulting to `""`, would be equivalent but work around the widlparser issue. Does this seem correct? Context: https://github.com/gpuweb/gpuweb/pull/3710 -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/webidl/pull/1211#pullrequestreview-1232854381 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/webidl/pull/1211/review/1232854381@github.com>
Received on Friday, 30 December 2022 02:43:20 UTC