Re: [whatwg/dom] Integration with trusted types inside of node conversion (PR #1258)

@lukewarlow commented on this pull request.



> +
+     <li><p>Set <var>value</var>'s <a for=CharacterData>data</a> to <var>text</var>.
+    </ol>
+
+    <li>
+     <p>If <var>value</var> is a {{TrustedScript}}, then:
+
+     <ol>
+      <li><p>Let <var>text</var> be <var>value</var>'s <a for=TrustedScript>\[[Data]]</a>
+      internal slot value.
+
+      <li><p>Let <var>newValue</var> be a new {{Text}} <a for=/>node</a> whose
+      <a for=CharacterData>data</a> is <var>text</var> and <a for=Node>node document</a> is
+      <var>document</var>.
+
+      <li><p>Replace <var>value</var> with <var>newValue</var>.

Yeah, and tbf both WebKit and Chromium actually make a new list object that they append to, so perhaps that'd be better to spec like that? MIght also handle the fact that the trusted types check can do script execution a bit better too? (Though looping through a list and can potentially be modified might be a seperate issue?)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1258#discussion_r1566361732
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1258/review/2002044477@github.com>

Received on Monday, 15 April 2024 20:01:02 UTC