我正在开发一个firefox插件,我希望它在每个表单字段上添加一个事件监听器。我该如何实现呢。
答案 0 :(得分:0)
// 'extension is loaded', you probably have this
window.addEventListener("load", function() {
// run your_function() when page is loaded and DOM is ready
gBrowser.addEventListener("DOMContentLoaded", your_function, true);
}, false);