-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
"Record & Tuple" proposal HTML serialization support #6958
base: main
Are you sure you want to change the base?
"Record & Tuple" proposal HTML serialization support #6958
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable.
source
Outdated
<p>Otherwise, if <var>serialized</var>.[[Type]] is "record", then:</p> | ||
|
||
<ol> | ||
<li><p>Let <var>entries</var> be a new empty <span data-x="js-List">List.</span></p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<li><p>Let <var>entries</var> be a new empty <span data-x="js-List">List.</span></p></li> | |
<li><p>Let <var>entries</var> be a new empty <span data-x="js-List">List</span>.</p></li> |
source
Outdated
@@ -8484,6 +8592,48 @@ interface <dfn interface>DOMStringList</dfn> { | |||
<p>If <var>deep</var> is true, then:</p> | |||
|
|||
<ol> | |||
<li> | |||
<p> If <var>value</var> has a [[RecordData]] internal slot, then:</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p> If <var>value</var> has a [[RecordData]] internal slot, then:</p> | |
<p>If <var>value</var> has a [[RecordData]] internal slot, then:</p> |
source
Outdated
</li> | ||
|
||
<li> | ||
<p> If <var>value</var> has a [[TupleData]] internal slot, then:</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p> If <var>value</var> has a [[TupleData]] internal slot, then:</p> | |
<p>Otherwise, if <var>value</var> has a [[TupleData]] internal slot, then:</p> |
source
Outdated
</li> | ||
|
||
<li> | ||
<p> If <var>value</var> has a [[BoxData]] internal slot, then:</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p> If <var>value</var> has a [[BoxData]] internal slot, then:</p> | |
<p>Otherwise, if <var>value</var> has a [[BoxData]] internal slot, then:</p> |
source
Outdated
<li><p>Set <var>serialized</var>.[[BoxData]] to <var>data</var>.</p></li> | ||
</ol> | ||
</li> | ||
|
||
<li> | ||
<p>If <var>value</var> has a [[MapData]] internal slot, then: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p>If <var>value</var> has a [[MapData]] internal slot, then: | |
<p>Otherwise, if <var>value</var> has a [[MapData]] internal slot, then: |
source
Outdated
<li><p>Set <var>value</var> to a new Record object in <var>targetRealm</var> whose | ||
[[RecordData]] internal slot value is a empty.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to suggest something like OrdinaryObjectCreate, but it seems like that doesn't acknowledge realms, and what you've written is consistent with the rest of this algorithm, so it's fine.
source
Outdated
<li><p>Set <var>value</var> to a new Record object in <var>targetRealm</var> whose | ||
[[RecordData]] internal slot value is a empty.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"a empty"?
|
||
<ol> | ||
<li><p>Set <var>value</var> to a new Tuple object in <var>targetRealm</var> whose | ||
[[TupleData]] internal slot value is a empty.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"a empty"
source
Outdated
|
||
<ol> | ||
<li><p>Set <var>value</var> to a new Box object in <var>targetRealm</var> whose | ||
[[BoxData]] internal slot value is a empty.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"a empty"
source
Outdated
@@ -125479,6 +125769,9 @@ INSERT INTERFACES HERE | |||
<dt id="refsJSJSONMODULES">[JSJSONMODULES]</dt> | |||
<dd><cite><a href="https://tc39.es/proposal-json-modules/">JSON Modules</a></cite>. Ecma International.</dd> | |||
|
|||
<dt id="refsJSRECORDTUPLE">[JSRECORDTUPLE]</dt> | |||
<dd><cite><a href="https://tc39.es/proposal-record-tuple/">Recor & Tuple</a></cite>. Ecma International.</dd> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<dd><cite><a href="https://tc39.es/proposal-record-tuple/">Recor & Tuple</a></cite>. Ecma International.</dd> | |
<dd><cite><a href="https://tc39.es/proposal-record-tuple/">Record & Tuple</a></cite>. Ecma International.</dd> |
7a4b299
to
6673e86
Compare
6673e86
to
6a89eea
Compare
PR updated! I applied @Ms2ger's suggestions, and deleted support for |
This PR lets the record/tuple/box primitives, introduced by the Record & Tuple proposal, be serialized and de-serialized by the structured clone algorithm. It also adds serialization support for their wrapper objects.
I'm marking this as a draft PR because:
Record
name confilcts with the internal specification type (we have the same problem in the ecma262 spec): (Naming conflict with WebIDL's record<K, V> tc39/proposal-record-tuple#116)Ref to early review of this proposal: w3ctag/design-reviews#518
(See WHATWG Working Mode: Changes for more details.)
💥 Error: Wattsi server error 💥
PR Preview failed to build. (Last tried on Aug 13, 2021, 9:49 AM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 Wattsi Server - Wattsi Server is the web service used to build the WHATWG HTML spec.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.
💥 Error: Wattsi server error 💥
PR Preview failed to build. (Last tried on Jul 1, 2022, 9:43 AM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 Wattsi Server - Wattsi Server is the web service used to build the WHATWG HTML spec.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.