mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Disable scripting when sandbox flag is set (#39163)
While I adding spec comments to the CSP crate, I discovered two issues: 1. We should only use the last sandbox value (WPT test added) 2. We weren't checking for the scripting sandbox flag in document Also, the autoplay test should have allowed scripts to run, otherwise the test doesn't run. Since we weren't checking the flag before, the test ran fine for Servo. However, it wouldn't run for other browsers. Also realized that an existing test was pointing to a non-existent file (since it doesn't have `.sub`). Updated that and confirmed that in other browsers it now properly works (it no longer shows a 404). However, Servo now fails that test as we don't fire an load event. Part of #913 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
088d16d634
commit
e3de39893f
15 changed files with 180 additions and 48 deletions
|
@ -720,7 +720,7 @@ impl EventTarget {
|
|||
};
|
||||
|
||||
// Step 3.2
|
||||
if !document.is_scripting_enabled() {
|
||||
if !document.scripting_enabled() {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue