mirror of
https://github.com/servo/servo.git
synced 2025-07-28 01:30:32 +01:00
commit
e39e75865b
4 changed files with 18 additions and 50 deletions
|
@ -170,9 +170,25 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> {
|
||||||
// these steps at this point. The script is not executed.
|
// these steps at this point. The script is not executed.
|
||||||
|
|
||||||
// Step 12.
|
// Step 12.
|
||||||
// TODO: If the script element has an `event` attribute and a `for` attribute, then run
|
match element.get_attribute(ns!(""), &atom!("for")).root() {
|
||||||
// these substeps...
|
Some(for_script) => {
|
||||||
|
if for_script.r().Value().to_ascii_lowercase().trim_matches(HTML_SPACE_CHARACTERS) != "window" {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => { }
|
||||||
|
}
|
||||||
|
|
||||||
|
match element.get_attribute(ns!(""), &Atom::from_slice("event")).root() {
|
||||||
|
Some(event) => {
|
||||||
|
let event = event.r().Value().to_ascii_lowercase();
|
||||||
|
let event = event.trim_matches(HTML_SPACE_CHARACTERS);
|
||||||
|
if event != "onload" && event != "onload()" {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => { }
|
||||||
|
}
|
||||||
// Step 13.
|
// Step 13.
|
||||||
// TODO: If the script element has a `charset` attribute, then let the script block's
|
// TODO: If the script element has a `charset` attribute, then let the script block's
|
||||||
// character encoding for this script element be the result of getting an encoding from the
|
// character encoding for this script element be the result of getting an encoding from the
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
[script-for-event.html]
|
|
||||||
type: testharness
|
|
||||||
[Script 0]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 1]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 2]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 5]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 6]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 7]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 8]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 9]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 10]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Script 11]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[script-for-event.xhtml]
|
|
||||||
type: testharness
|
|
||||||
[Scripts with for and event attributes should not run.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[script-for-onload.html]
|
|
||||||
type: testharness
|
|
||||||
[Script for and onload attributes]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue