mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1072607 - [e10s] Handle removeEventListener correctly in EventTarget shim (r=mconley)
This commit is contained in:
parent
995a3add7e
commit
e127657aa3
@ -361,6 +361,8 @@ let ObserverChild = {
|
||||
function EventTargetChild(childGlobal)
|
||||
{
|
||||
this._childGlobal = childGlobal;
|
||||
this.capturingHandler = (event) => this.handleEvent(true, event);
|
||||
this.nonCapturingHandler = (event) => this.handleEvent(false, event);
|
||||
NotificationTracker.watch("event", this);
|
||||
}
|
||||
|
||||
@ -372,7 +374,7 @@ EventTargetChild.prototype = {
|
||||
track: function(path, register) {
|
||||
let eventType = path[1];
|
||||
let useCapture = path[2];
|
||||
let listener = (event) => this.handleEvent(useCapture, event);
|
||||
let listener = useCapture ? this.capturingHandler : this.nonCapturingHandler;
|
||||
if (register) {
|
||||
this._childGlobal.addEventListener(eventType, listener, useCapture, true);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user