Triggering a custom event with attributes from a Firefox extension
问题 I have a Firefox extension that modifies the content of the page that the user is looking at. As part of that process the extension needs to trigger a custom event that the extension itself adds to the page source. I am having difficulties passing parameters to that custom event. What am I doing wrong? Script block inserted into the head of the page: document.addEventListener("show-my-overlay", EX_ShowOverlay, false, false, true); function EX_ShowOverlay(e) { alert('Parameter: ' + e.index); /