I want to catch all window.open() link clicks, meta-refresh sub-frames
loading.. etc.
I want to stop any further action and handle where and what to load by
myself.
This is what I cooked up so far.

# To catch window.open()
I use the nsIPermissionManager to make sure the URI currently loaded
in the iframe is on the blacklist for popups.
This is so all window.open() kinda navigations can be caught in the
"DOMPopupBlocked" event.

# To catch link-click, form-submit and map-clicks (areas)
I implement a bare nsILinkHandler and overwrite the existing one (as
seen in..
http://lxr.mozilla.org/mozilla1.8/source/editor/libeditor/html/nsHTMLEditor.cpp#236)

# To catch page refresh or sub frames loading. I use
nsIURIContentListener->onStartURIOpen()

This way, i guess i can catch each and every "navigational action"
before any request is created.
Is this the way to go, or are there other ways?
Please help.

This is for an extension for firefox/xulrunner.

Dennis

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to