Apparently, document.addEventListener()
is unreliable, and hence, my error. Use window.addEventListener()
with the same parameters, instead.
Related Contents:
- Removing an anonymous event listener
- addEventListener vs onclick
- How to trigger event in JavaScript?
- Get image data URL in JavaScript?
- addEventListener calls the function without me even asking it to
- How to pass arguments to addEventListener listener function?
- Choosing and activating the right controls on an AJAX-driven site
- JS li tag onclick not working on IE8
- Run Greasemonkey script on the same page, multiple times?
- Stop execution of Javascript function (client side) or tweak it
- addEventListener using for loop and passing values [duplicate]
- add event listener on elements created dynamically
- Javascript removeEventListener not working
- Javascript “addEventListener” Event Fires on Page Load [duplicate]
- Javascript – How to detect if document has loaded (IE 7/Firefox 3)
- My very simple Greasemonkey script is not running?
- Accessing Variables from Greasemonkey to Page & vice versa
- How do I get the information from a meta tag with JavaScript?
- How to check whether dynamically attached event listener exists or not?
- Cannot read property ‘addEventListener’ of null
- Binding multiple events to a listener (without JQuery)?
- Correct usage of addEventListener() / attachEvent()?
- Fire Greasemonkey script on AJAX request
- How to get an AJAX get-request to wait for the page to be rendered before returning a response?
- Adding click event handler to iframe
- Want to add “addEventListener” on multiple elements with same class [duplicate]
- Detect iFrame embedding in Javascript
- Injecting JS functions into the page from a Greasemonkey script on Chrome
- Can a website know if I am running a userscript?
- Simulating a mousedown, click, mouseup sequence in Tampermonkey?
- How can I intercept XMLHttpRequests from a Greasemonkey script?
- Why is window (and unsafeWindow) not the same from a userscript as from a tag?
- JavaScript listener, “keypress” doesn’t detect backspace?
- Why Firefox says that window.event is undefined? (call function with added event listener)
- Userscript to wait for page to load before executing code techniques?
- How can I detect visited and unvisited links on a page?
- UserScripts & Greasemonkey: calling a website’s JavaScript functions
- addEventListener on a querySelectorAll() with classList [duplicate]
- Save images to hard disk WITHOUT prompt?
- How can I load a shared web worker with a user-script?
- How to exclude iframe in Greasemonkey or Tampermonkey?
- Variable in JavaScript callback functions always gets last value in loop? [duplicate]
- addEventListener vs onclick
- How to call Greasemonkey’s GM_ functions from code that must run in the target page scope?
- How do I click on this button with Greasemonkey?
- Code inside DOMContentLoaded event not working
- Error: Permission denied to access property ‘handler’
- “getElementById not a function” when trying to parse an AJAX response?
- How to simulate typing in input field using jQuery?
- How do I get Greasemonkey to click on a button that only appears after a delay?