mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
As a follow-up to the recent introduction of `script.src` as trusted sink, this PR refactors machinery to also support `TrustedScript`. In doing so, all trusted sinks in `HTMLScriptElement` are now covered. Instead of calling the callbacks in `policy.createX`, we now have a `TrustedType` enum that specifies which callback to invoke. Unfortunately we still have the `USVString` vs `DOMString` problem, which is why we need to `.map` twice to retrieve the backing `String` and avoid two different types. Additionally, I saw that `script.text` should have called the "String replace all" algorithm rather than setting the child contents. So that's also now fixed. Part of #36258 Requires servo/html5ever#608 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com> Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com> |
||
---|---|---|
.. | ||
api.html.template | ||
apis.html.template | ||
Bindings.conf | ||
CodegenRust.py | ||
Configuration.py | ||
interface.html.template | ||
property.html.template | ||
run.py |