dom icon indicating copy to clipboard operation
dom copied to clipboard

Integration with trusted types inside of node conversion

Open lukewarlow opened this issue 1 year ago • 4 comments

  • [ ] At least two implementers are interested (and none opposed):
    • Chromium (already implemented)
  • [ ] Tests are written and can be reviewed and commented upon at:
    • https://wpt.fyi/trusted-types already includes a number of tests for these changes.
  • [ ] Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
  • [ ] MDN issue is filed: …
  • [ ] The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

lukewarlow avatar Feb 22 '24 17:02 lukewarlow

Bolt on to #1247

lukewarlow avatar Feb 22 '24 17:02 lukewarlow

@lukewarlow you mentioned somewhere you'd appreciate a review in order to simplify the change. Since it's not primarily about correctness, how helpful would an imminent review be?

mbrodesser-Igalia avatar Feb 26 '24 09:02 mbrodesser-Igalia

@mbrodesser-Igalia that was for an editorial PR to trusted types (which has been merged) rather than this one, so nothing urgent here.

lukewarlow avatar Feb 26 '24 11:02 lukewarlow

This looks complicated. Any reason we cannot convert to Text nodes first and then potentially throw for Text nodes if they pose some kind of danger in combination with a script element?

Ah yeah that's a good idea, can process text nodes and raw strings at the same time them and then can just handle the trusted script after the other processing (because it needs to hold onto the fact it's safe). I knew there was probably a nicer way.

lukewarlow avatar Mar 04 '24 12:03 lukewarlow

@annevk is there anything left that's needed for this PR? Wanna make sure I'm not holding anything up.

lukewarlow avatar Apr 09 '24 10:04 lukewarlow

LGTM @annevk thanks for your help getting this across the line.

lukewarlow avatar Apr 18 '24 14:04 lukewarlow