I want to filter some DOM nodes, e.g. with ID="banner" like firefox plugin AdBlock does.
Is there any trident parser event on node insertion into document?
Or maybe just before the node rendering occurs?
Or maybe custom behaviors should do the trick?
I believe that filtering nodes on DownloadComplete or DocumentComplete events is not an option because of page flickering. Can we just "not display" filtered nodes rather than displaying and then hiding them?
I want to do exacly the same thing. I asked similar question on stackoverflow (http://stackoverflow.com/questions/4224498/) but I still don't know.
Bigger problem is for scripts because in adblock when script matches the filter it isn't loaded and executed. But in IE removing script after DocumentComplete do nothing so adverts generated by this script are still visible.
I'd appreciate if someone would answer this question!
Can You tell what exactly should I use from this site?
I see I can write my own custom pluggable protocol like in examples here and here . But this won't give me what I want. I want to filter image, flashes, script, etc. And here I can only manage link with "new_protocl:url" pattern.
In the site you gave a link there is also something called "Pluggable MIME Filters" but from what I understand It's not what I'm looking for because
"pluggable MIME filters are only invoked by Internet Explorer for the resource specified by the URL. The MIME filter will not be invoked for other resources (such as images on an HTML page) that are associated with the resource specified by the URL."
So how witting my own pluggable protocol handler would be useful for implementing something like AdBlock?