Skip to content

Commit 8057eff

Browse files
committed
Remove StringContext attribute
Swap to using a union type and updating the algorithms directly.
1 parent b7cb119 commit 8057eff

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

spec/index.bs

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,18 +1128,9 @@ Issue: The [=event handler content attribute=] concept used below is ambiguous.
11281128
# Integrations # {#integrations}
11291129

11301130
<pre class="idl">
1131-
typedef [StringContext=TrustedHTML] DOMString HTMLString;
1132-
typedef [StringContext=TrustedScript] DOMString ScriptString;
1133-
typedef [StringContext=TrustedScriptURL] USVString ScriptURLString;
11341131
typedef (TrustedHTML or TrustedScript or TrustedScriptURL) TrustedType;
11351132
</pre>
11361133

1137-
## Integration with WebIDL ## {#webidl-integration}
1138-
1139-
<h3 id="StringContext" extended-attribute lt="StringContext">[StringContext]</h3>
1140-
1141-
Issue: See [https://github.com/whatwg/webidl/pull/1392](https://github.com/whatwg/webidl/pull/1392).
1142-
11431134
## Integration with HTML ## {#integration-with-html}
11441135

11451136
{{Window}} and {{Worker}} objects have a <dfn for="Window">trusted type policy factory</dfn>,
@@ -1278,41 +1269,6 @@ abstract operation. User agents must use the following implementation:
12781269
1. If |argument| is a {{TrustedScript}} object, return the value of its associated [=TrustedScript/data=].
12791270
1. Return ~unknown~.
12801271

1281-
### Validate the string in context ### {#html-validate-the-string-in-context}
1282-
1283-
This specification defines the validate the string in context algorithm in [[html#integration-with-idl]].
1284-
1285-
When validate the string in context is invoked, with |platformObject|, |value|, |stringContext|, and |identifier| run these steps:
1286-
1287-
1. If |platformObject|'s [=relevant global object=] has a [=Window/trusted type policy factory=]:
1288-
1289-
1. Set |sink| to the result of [=concatenating=] the list &laquo; |platformObject|'s <a spec=webidl>identifier</a>, |identifier| &raquo; with `" "` as |separator|.
1290-
<div class="example" id="validate-string-example">
1291-
For example, the following annotation and JavaScript code:
1292-
<pre highlight=idl>
1293-
typedef [StringContext=TrustedHTML] DOMString HTMLString;
1294-
[ Exposed=Window, HTMLConstructor] interface HTMLIFrameElement : HTMLElement {
1295-
attribute HTMLString srcdoc;
1296-
};
1297-
</pre>
1298-
<pre highlight=js>
1299-
document.createElement('iframe').srcdoc = foo;
1300-
document.createElement('iframe').setAttribute('SRCdoc', foo);
1301-
</pre>
1302-
causes the |sink| value to be `"HTMLIFrameElement srcdoc"`.
1303-
</div>
1304-
1. Set |value| to the result of running the [$Get Trusted Type compliant string$] algorithm, passing the following arguments:
1305-
* |value| as |input|,
1306-
* |stringContext| as |expectedType|,
1307-
* |sink| as |sink|,
1308-
* `'script'` as |sinkGroup|,
1309-
* |platformObject|'s [=relevant global object=] as |global|.
1310-
1311-
Issue: Remove hardcoding 'script' when new sink groups are specified.
1312-
1313-
1. If an exception was thrown, rethrow exception and abort further steps.
1314-
1. Return |value|.
1315-
13161272
## Integration with DOM ## {#integration-with-dom}
13171273

13181274
Note: See [https://github.com/whatwg/dom/pull/1258](https://github.com/whatwg/dom/pull/1258) and [https://github.com/whatwg/dom/pull/1268](https://github.com/whatwg/dom/pull/1268) which upstream this integration.

0 commit comments

Comments
 (0)