Implement AddEventListenerOptions: once

Fixes #13242
This commit is contained in:
Bastien Orivel 2018-11-03 16:23:33 +01:00
parent f3ca48206e
commit 50c832762f
5 changed files with 27 additions and 15 deletions

View file

@ -525,7 +525,10 @@ fn inner_invoke(
// Step 2.2.
found = true;
// TODO: step 2.5.
// Step 2.5.
if let CompiledEventListener::Listener(event_listener) = listener {
object.remove_listener_if_once(&event.type_(), &event_listener);
}
// Step 2.6.
let marker = TimelineMarker::start("DOMEvent".to_owned());