I'm writing a Chrome extension that injects a content script into a page. That script adds an event listener to a select element on the page so that a routine can be executed whenever someone selects a new value from the drop-down.
I've tried adding this event listener with both the "normal" JS method:
document.getElementById('mySelect').addEventListener('change', doSomething);
...and the jQuery method:
$('#mySelect').change(doSomething);
Neither seems to work; the event never fires.
By inspecting the element with Chrome's developer tools, I've discovered that the element already has an event listener on it, created by another script already running on the page. I know that this listener is functioning because the resulting script logs some data to the console. I'm wondering if this existing listener could somehow be "absorbing" the change event and preventing it from reaching my own listener.
Oddly enough, when I turn on monitorEvents for the element, it logs no events at all of any type (not even things that shouldn't be affected, like mouseover).
Any thoughts?