diff --git a/spec.bs b/spec.bs index cf8b504e..24ff365a 100644 --- a/spec.bs +++ b/spec.bs @@ -1222,6 +1222,80 @@ Each {{FencedFrameConfig}} has: 1. Initialize |value|'s [=fencedframeconfig/contentHeight=] to |serialized|.\[[ContentHeight]]. +Note: To help with ease of adoption, +[until 2026](https://github.com/WICG/turtledove/issues/286#issuecomment-1682842636) we will support +the API {{Window/navigator}}.{{Navigator/deprecatedReplaceInURN()}}, which allows you to substitute +macros into the [=fenced frame config/mapped url=] corresponding to a given [=urn uuid=] or +{{FencedFrameConfig}}. + +
+typedef (USVString or FencedFrameConfig) UrnOrConfig; + +partial interface Navigator { + Promise<undefined> deprecatedReplaceInURN( + UrnOrConfig urnOrConfig, record<USVString, USVString> replacements); +}; ++ +
${
or %%
,
+ [=exception/throw=] a {{TypeError}}.
+ 1. If |key| does not [=string/end with=] }
or %%
,
+ [=exception/throw=] a {{TypeError}}.
+
+ 1. Let |p| be [=a new promise=].
+
+ 1. Let |global| be [=this=]'s [=relevant global object=].
+
+ 1. Run the following steps [=in parallel=]:
+
+ 1. Let |mapping| be |global|'s [=associated Document=]'s [=node navigable=]'s
+ [=navigable/traversable navigable=]'s [=traversable navigable/fenced frame config mapping=].
+
+ 1. Let |config| be the result of [=fenced frame config mapping/finding a config=] in |mapping|
+ with |urn|.
+
+ 1. If |config| is failure, [=queue a global task=] on the [=DOM manipulation task source=]
+ given |global|, to [=resolve=] |p| with {{undefined}}, and abort these steps.
+
+ 1. Let |substitutedUrl| be the result of [=fencedframeutil/substituting macros=] with
+ |replacements| into |config|'s [=fenced frame config/mapped url=]'s [=mapped url/value=].
+
+ 1. Set |config|'s [=fenced frame config/mapped url=]'s [=mapped url/value=] to
+ |substitutedUrl|.
+
+ 1. [=Queue a global task=] on the [=DOM manipulation task source=] given |global|, to
+ [=resolve=] |p| with {{undefined}}.
+
+ 1. Return |p|.
+
+