Skip to content
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

Make nulling out an inline event handler remove it from the list order #25653

Merged
merged 1 commit into from Jan 31, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fix some of the remove-event-handler problems

  • Loading branch information
pshaughn committed Jan 30, 2020
commit 2874c62d352fec7e9544dffea6d4e9a733b29808
@@ -404,9 +404,15 @@ impl EventTarget {
});

match idx {
Some(idx) => {
entries[idx].listener =
EventListenerType::Inline(listener.unwrap_or(InlineEventListener::Null));
Some(idx) => match listener {
// Replace if there's something to replace with,
// but remove entirely if there isn't.
Some(listener) => {
entries[idx].listener = EventListenerType::Inline(listener);
},
None => {
entries.remove(idx);
},
},
None => {
if let Some(listener) = listener {
@@ -1,10 +1,3 @@
[event-handler-removal.window.html]
[Event handler set through content attribute should be deactivated when the content attribute is removed.]
expected: FAIL

[Event handler set through IDL should be deactivated when the IDL attribute is set to null.]
expected: FAIL

[Event handler set through content attribute should be removed when they are set to null.]
expected: FAIL

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.