On 09/28/12 11:08, Paul Rouget wrote:
In the Developer Tools, we often need to get a list of all the windows present
in a page. (main window, iframes, iframes in iframes, …).
We also need to be notified when a new window is created 
(createElement("iframe")).

The naive way to do it:
- recursively go throught the iframes via the DOM

There are alternatives to this, using the docshell tree f.e., but it probably isn't much different to just doing that.

- add mutations observers to be notified when an iframe is created

Register an observer notification to be called when content globals are created: https://developer.mozilla.org/en-US/docs/Observer_Notifications#Documents

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to