-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add attribute validate steps. #809
Conversation
Allows for integrating with Trusted Types - see whatwg#789. Contains whatwg#805.
Rebased now that #805 is merged. |
From my pov this is ready for a review, see discussion in #789. |
Friendly ping, this seems to be the most efficient way we can prevent attribute node bypasses in Trusted Types by rejecting the value without potentially calling the default policy on all attr mutations. |
I think this makes sense, but we should add a note explaining this setup somewhere close to where it's relevant. |
This should have implementor interest now given Mozilla's positive standards position on trusted types as a whole. |
I wonder if we want an arbitrary extension point for this or just call into Trusted Types directly. With an arbitrary extension point we have the risk of running into ordering issues so we tend to avoid those these days, even though the DOM has some precedent for it (mainly historical). |
I don't have a strong preference here. As long as it is possible to guard attribute mutations done by the DOM APIs, the actual algorithms can be defined in either spec. This PR was the only necessary integration point of TT with DOM. What might be problematic is not technical, i.e. can DOM call out to specs that are currently at FPWD? Waiting until CR is probably not very useful to the authors here, especially with shipped implementations. |
That's not really an issue, especially for integration points. And in fact, we tend to prefer referencing the latest editor's draft. |
Definite +1 for a direct call out. |
See w3c/trusted-types#418 and whatwg#789. Supercedes PR whatwg#809.
#1247 and w3c/trusted-types#418 supercede this one. Unfortunately handling the attr mutation in DOM happens now after setting the new value, so I had to add an explicit new step to the algorithms. |
See w3c/trusted-types#418 and whatwg#789. Supercedes PR whatwg#809.
See w3c/trusted-types#418 and whatwg#789. Supercedes PR whatwg#809.
See w3c/trusted-types#418 and whatwg#789. Supercedes PR whatwg#809.
See w3c/trusted-types#418 and whatwg#789. Supercedes PR whatwg#809.
See w3c/trusted-types#418 and whatwg#789. Supercedes PR whatwg#809.
When handling attribute change, validate the value before setting it.
Attribute append now also takes a value, and sets it only after handling the changes (this should be side-effects free, as no callbacks in handle attribute change get passed the attribute node - whose value is not yet set).
See #789 for the background. This PR doesn't allow the validate steps to change the value, only to possibly reject setting it.
💥 Error: 500 Internal Server Error 💥
PR Preview failed to build. (Last tried on Jan 15, 2021, 7:33 AM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 CSS Spec Preprocessor - CSS Spec Preprocessor is the web service used to build Bikeshed specs.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.