Trusted types integration dom #6057
Open
+1,002
−177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should cover most of the integration with TrustedTypes and the DOM apis
In particular this is the work required to implement Section 4.2 of the TrustedTypes Spec.
It follows the MR of whatwg/dom#1268 as close as we can given it is not merged yet.
There is 2 special points we need to be aware of:
execCommand
is ad-hoc since that standard was abandoned. There are some WPT test to cover them and my goal was to make the test pass and what made sense in my head.csp-violations.js
but it means we won't see them in our official WPT score until we solve https://github.com/LadybirdBrowser/ladybird/blob/master/Libraries/LibWeb/WebSockets/WebSocket.cpp#L191. I gave it quick try with not much hope but it is clearly outside the scope of this MR.