diff --git a/spec.bs b/spec.bs index fcc5984..2501a27 100644 --- a/spec.bs +++ b/spec.bs @@ -464,15 +464,19 @@ The config IDL attribute getter Note: This holds because when the element has been removed from the DOM, its removal steps immediately destroy the [=fenced navigable container/fenced navigable=]. - 1. Let |urn uuid| be the given {{FencedFrameConfig}}'s [=fencedframeconfig/urn=]. + 1. Let |navigation url or urn| be the given {{FencedFrameConfig}}'s [=fencedframeconfig/url=] if + the given {{FencedFrameConfig}}'s [=fencedframeconfig/url=] is not null, and the given + {{FencedFrameConfig}}'s [=fencedframeconfig/urn=] otherwise. + + 1. If |navigation url or urn| is failure, then return. 1. Let |shared storage context| be the given {{FencedFrameConfig}}'s [=fencedframeconfig/ sharedStorageContext=]. - 1. [=Navigate=] |element|'s [=fenced navigable container/fenced navigable=] to |urn uuid| using - |element|'s [=Node/node document=], with [=historyHandling=] set to "`replace`", [=referrerPolicy=] set to "`no-referrer`", and - |shared storage context|. + 1. [=Navigate=] |element|'s [=fenced navigable container/fenced navigable=] to + |navigation url or urn| using |element|'s [=Node/node document=], with [=historyHandling=] set + to "`replace`", [=referrerPolicy=] set to + "`no-referrer`", and |shared storage context|. Note: See [[#navigation-changes]] for the <{fencedframe}>-specific changes to the ordinary navigation flow. @@ -1318,6 +1322,8 @@ maps to an internal [=fenced frame config=] [=struct=]. [Exposed=Window, Serializable] interface FencedFrameConfig { + constructor(USVString url); + readonly attribute FencedFrameConfigSize? containerWidth; readonly attribute FencedFrameConfigSize? containerHeight; readonly attribute FencedFrameConfigSize? contentWidth; @@ -1327,13 +1333,9 @@ maps to an internal [=fenced frame config=] [=struct=]. }; -Note: Note that {{FencedFrameConfig}}s cannot be constructed manually from JavaScript. They can only -be created by config-generating APIs. However, some browsers [support a developer-only -flag](https://github.com/WICG/fenced-frame/issues/94) which help developers test the <{fencedframe}> -element with arbitrary URLs *not* produced by config-generating APIs for development. - Each {{FencedFrameConfig}} has: + * A url, a [=URL=], failure, or null, initially null * A urn, a [=urn uuid=] * A sharedStorageContext, a [=string=] * A containerWidth, a {{FencedFrameConfigSize}} or null @@ -1341,6 +1343,19 @@ Each {{FencedFrameConfig}} has: * A contentWidth, a {{FencedFrameConfigSize}} or null * A contentHeight, a {{FencedFrameConfigSize}} or null +Note: A config's [=fencedframeconfig/url=] is only null if a [=fencedframeconfig/urn=] is supplied. + +
+ The FencedFrameConfig(|url|) constructor method steps + are: + + 1. Let |config| be a [=new=] {{FencedFrameConfig}} object. + + 1. Set |config|'s [=fencedframeconfig/url=] to the result of running the [=URL parser=] on |url|. + + 1. Return |config|. +
+
The {{FencedFrameConfig/containerWidth}} IDL attribute getter steps are to return [=this=]'s [=fencedframeconfig/containerWidth=]. @@ -1372,6 +1387,8 @@ Each {{FencedFrameConfig}} has: 1. If |forStorage| is true, then throw a {{DataCloneError}} {{DOMException}}. + 1. Set |serialized|.\[[Url]] to |value|'s [=fencedframeconfig/url=]. + 1. Set |serialized|.\[[Urn]] to |value|'s [=fencedframeconfig/urn=]. 1. Set |serialized|.\[[SharedStorageContext]] to |value|'s [=fencedframeconfig/ @@ -1396,6 +1413,8 @@ Each {{FencedFrameConfig}} has: Their [=deserialization steps=], given |serialized|, |value|, and targetRealm are: + 1. Initialize |value|'s [=fencedframeconfig/url=] to |serialized|.\[[Url]]. + 1. Initialize |value|'s [=fencedframeconfig/urn=] to |serialized|.\[[Urn]]. 1. Initialize |value|'s [=fencedframeconfig/sharedStorageContext=] to