简体   繁体   English

为什么XUL负载处理程序不起作用?

[英]Why doesn't XUL load handler work?

In Firefox dev tools, it seems the XUL iframes won't fire after the initial onload. 在Firefox开发人员工具中,似乎在初始加载后XUL iframe不会启动。 For example, see the bottom of this file , where the extension makes the selected element in the inspector more easy to see. 例如,请参见此文件底部 ,其中扩展名使检查器中的选定元素更易于查看。 This is working when you open the inspector, but when you click to another page it reverts to the old inspector tree style. 当您打开检查器时,此方法起作用,但是当您单击另一个页面时,它将恢复为旧的检查器树样式。 I even tried frame.contentWindow.addEventListener('load',styleit); 我什至尝试过frame.contentWindow.addEventListener('load',styleit); , but it doesn't fire when a link is clicked on the web page, and page has loaded. ,但是在网页上单击链接并且页面已加载时不会触发。

a) get a reference of the InspectorPanel object a)获取InspectorPanel对象的引用
b) listen for the ready event b)听ready事件

var ip = window.ownerDocument.defaultView.inspector;`
ip.on("ready", styleit)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM