Frage

In Firefox dev tools, it seems the XUL iframes won't fire after the initial onload. 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);, but it doesn't fire when a link is clicked on the web page, and page has loaded.

War es hilfreich?

Lösung

a) get a reference of the InspectorPanel object
b) listen for the ready event

var ip = window.ownerDocument.defaultView.inspector;`
ip.on("ready", styleit)
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top