- From: Luke Warlow <notifications@github.com>
- Date: Mon, 08 Apr 2024 03:38:31 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/webidl/pull/1392/review/1986050426@github.com>
@lukewarlow commented on this pull request. > @@ -10259,6 +10261,39 @@ that does specify [{{SecureContext}}]. </pre> </div> +<h4 id="StringContext" extended-attribute lt="StringContext">[StringContext]</h4> + +If the [{{StringContext}}] [=extended attribute=] appears on {{DOMString}} or {{USVString}}, it +modifies how the value is converted to the IDL type, causing additional value validation to +adhere to the context the string is used in. + +The [{{StringContext}}] extended attribute must [=takes an identifier|take an identifier=]. The [=identifier=] +must be one of "<code>TrustedHTML</code>", "<code>TrustedScript</code>", and "<code>TrustedScriptURL</code>". + +The [{{StringContext}}] extended attribute may only annotate a type of a [=regular attribute=] or +a [=regular operation=] argument. A type annotated with the [{{StringContext}}] +extended attribute must not appear in a [=read only=] attribute. + +A type that is not {{DOMString}} or {{USVString}} must not be [=extended attributes associated with|associated with=] https://github.com/w3c/trusted-types/pull/484 - in this PR the textContent one specifically was updated to use a union. I've done a follow up commit that changes them all to unions (which I can easily revert if we decide against that) -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/webidl/pull/1392#discussion_r1555604491 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/webidl/pull/1392/review/1986050426@github.com>
Received on Monday, 8 April 2024 10:38:35 UTC