Auto merge of #15024 - nox:load-fixes, r=jdm

Kill beforescriptexecute and afterscriptexecute (fixes #12446)

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15024)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-01-14 07:17:40 -08:00 committed by GitHub
commit ed7c34a79a
3 changed files with 0 additions and 36 deletions

View file

@ -54,8 +54,6 @@ click
keydown
keypress
abort
beforescriptexecute
afterscriptexecute
invalid
change
open

View file

@ -481,11 +481,6 @@ impl HTMLScriptElement {
Ok(script) => script,
};
// TODO(#12446): beforescriptexecute.
if self.dispatch_before_script_execute_event() == EventStatus::Canceled {
return;
}
// Step 3.
let neutralized_doc = if script.external {
debug!("loading external script, url = {}", script.url);
@ -517,9 +512,6 @@ impl HTMLScriptElement {
doc.decr_ignore_destructive_writes_counter();
}
// TODO(#12446): afterscriptexecute.
self.dispatch_after_script_execute_event();
// Step 8.
if script.external {
self.dispatch_load_event();
@ -531,18 +523,6 @@ impl HTMLScriptElement {
window.dom_manipulation_task_source().queue_simple_event(self.upcast(), atom!("error"), &window);
}
pub fn dispatch_before_script_execute_event(&self) -> EventStatus {
self.dispatch_event(atom!("beforescriptexecute"),
EventBubbles::Bubbles,
EventCancelable::Cancelable)
}
pub fn dispatch_after_script_execute_event(&self) {
self.dispatch_event(atom!("afterscriptexecute"),
EventBubbles::Bubbles,
EventCancelable::NotCancelable);
}
pub fn dispatch_load_event(&self) {
self.dispatch_event(atom!("load"),
EventBubbles::DoesNotBubble,

View file

@ -1,14 +0,0 @@
[historical.html]
type: testharness
[onbeforescriptexecute content attribute should not be supported]
expected: FAIL
[onafterscriptexecute content attribute should not be supported]
expected: FAIL
[beforescriptexecute event should not be supported]
expected: FAIL
[afterscriptexecute event should not be supported]
expected: FAIL