mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-14 05:44:20 +00:00
Bug 1072607 - [e10s] Handle removeEventListener correctly in EventTarget shim (r=mconley)
This commit is contained in:
parent
44e57f85b7
commit
f4bdb21ae2
@ -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…
x
Reference in New Issue
Block a user