I have this at the top of my options.js file. Until the last time I played with the extensions, I can not be sure of any help. Itβs worth taking a picture.
// fires when script is first loaded // can't do onInit directly here, because the DOM hasn't been loaded for options.html yet // we just set an event listener for document.DOMContentLoaded - In that handler we can call onInit document.addEventListener('DOMContentLoaded', onInit, false);
source share