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

Make FencedFrameConfig IDL objects serializable #111

Merged
merged 6 commits into from
Aug 26, 2023
Next Next commit
add serialization steps
  • Loading branch information
blu25 committed Aug 7, 2023
commit ad1187be48e86a44fb7edc40d9bbad246b0c9c9e
23 changes: 22 additions & 1 deletion spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ maps to an internal [=fenced frame config=] [=struct=].
typedef (unsigned long or OpaqueProperty) FencedFrameConfigSize;
typedef USVString FencedFrameConfigURL;

[Exposed=Window]
[Exposed=Window, Serializable]
interface FencedFrameConfig {
readonly attribute FencedFrameConfigSize? containerWidth;
readonly attribute FencedFrameConfigSize? containerHeight;
Expand Down Expand Up @@ -1189,6 +1189,27 @@ Each {{FencedFrameConfig}} has:
context=] to |contextString|.
</div>

<div algorithm="FencedFrameConfig serializer">
{{FencedFrameConfig}} objects are [=serializable objects=]. Their
[=serialization steps=], given |value|, |serialized|, and |forStorage| are:

1. If |forStorage| is true, then throw a {{DataCloneError}} {{DOMException}}.

2. Set |serialized|.`[[Urn]]` to the value of |value|'s [=fencedframeconfig/urn=] attribute.

3. Set |serialized|.`[[Config]]` to the value of |value|'s [=fencedframeconfig/config=] attribute.
</div>

<div algorithm="FencedFrameConfig deserializer">
Their
[=deserialization steps=], given |serialized|, |value|, and <var ignore>
targetRealm</var> are:

1. Initialize |value|'s [=fencedframeconfig/urn=] attribute to |serialized|.`[[Urn]]`.
blu25 marked this conversation as resolved.
Show resolved Hide resolved

2. Initialize |value|'s [=fencedframeconfig/config=] attribute to |serialized|.`[[Config]]`.
</div>

<h3 id=fence-interface>The {{Fence}} interface</h3>

Several APIs specific to fenced frames are defined on the {{Fence}} interface.
Expand Down