Commit 1c883635 authored by James A. Rosen's avatar James A. Rosen

async: use three args for addEventListener

The third argument for `addEventListener` and `removeEventListener`
is supposed to be optional, defaulting to `false`, but some browsers
(notably older versions of FireFox) require it.

See https://github.com/thinkpixellab/PxLoader/issues/5 and
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.removeEventListener
parent 54e7bf00
......@@ -41,7 +41,7 @@ function useMutationObserver() {
window.addEventListener('unload', function(){
observer.disconnect();
observer = null;
});
}, false);
return function(callback, arg) {
queue.push([callback, arg]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment