Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark DOMException as serializable #732

Merged
merged 7 commits into from
Jul 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -13352,7 +13352,8 @@ fragment:
<pre class="idl">
[
Exposed=(Window,Worker),
Constructor(optional DOMString message = "", optional DOMString name = "Error")
Constructor(optional DOMString message = "", optional DOMString name = "Error"),
Serializable
]
interface DOMException { // but see below note about ECMAScript binding
readonly attribute DOMString name;
Expand Down Expand Up @@ -13409,6 +13410,26 @@ The <dfn attribute for="DOMException"><code>code</code></dfn> attribute's getter
legacy code indicated in the [=error names table=] for this {{DOMException}} object's
[=DOMException/name=], or 0 if no such entry exists in the table.

{{DOMException}} objects are [=serializable objects=].

Their [=serialization steps=], given <var>value</var> and <var>serialized</var>, are:

<ol>
yutakahirano marked this conversation as resolved.
Show resolved Hide resolved
<li>Set <var>serialized</var>.\[[Name]] to <var>value</var>'s [=DOMException/name=].</li>
<li>Set <var>serialized</var>.\[[Message]] to <var>value</var>'s [=DOMException/message=].</li>
<li>User agents should attach a serialized representation of any interesting accompanying data
which are not yet specified, notably the <code>stack</code> property, to
<var>serialized</var>.</li>
</ol>

Their [=deserialization steps=], given <var>value</var> and <var>serialized</var>, are:

<ol>
<li><Set <var>value</var>'s [=DOMException/name=] to <var>serialized</var>.\[[Name]].</li>
<li><Set <var>value</var>'s [=DOMException/message=] to <var>serialized</var>.\[[Message]].</li>
<li>If any other data is attached to <var>serialized</var>, then deserialize and attach it to
<var>value</var>.</li>
</ol>

<h3 id="DOMTimeStamp" typedef oldids="common-DOMTimeStamp">DOMTimeStamp</h3>

Expand Down