[Project_owners] Use of nsIURIContentListener

Matthew Wilson matthew at mjwilson.demon.co.uk
Tue Dec 30 15:35:50 EST 2003


HJ wrote:
> Matthew Wilson <matthew at mjwilson.demon.co.uk> wrote:
> 
>>Hi,
>>  Has anyone used nsIURIContentListener successfully in their projects?
>>
>>  It should allow you to listen for content of a specified MIME type 
>>and deal with it in an extensions. I'm having trouble getting it to work 
>>as I expect though.
>>Matthew
> 
> 
> Hi,
> 
> What exactly are you trying to do?
> 
> I guess you've seen the .idl file already:
> http://lxr.mozilla.org/seamonkey/source/uriloader/base/nsIURIContentListener.idl
> but was wondering if you looked at this file:
> http://lxr.mozilla.org/seamonkey/source/xpfe/browser/resources/content/nsBrowserContentListener.js#149
> because that might be an important source for your project.

I'm trying to intercept WML content and display it in the browser.

This is already done in my wmlbrowser project, but it's done in an evil 
way, and I'd like to improve it.

My code at the moment (just temporary test code, really) is based on 
nsBrowserContentListener.js but doesn't really seem to work. That is, I 
appear to be able to register the component, but it never seems to get 
called when a page with an unknown content type is requested.

I've attached my test code in case anyone has the time and inclination 
to look at it. It's just overlaid into the main browser area at the moment.

-- 
Matthew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.js
Type: application/x-javascript
Size: 2783 bytes
Desc: not available
Url : http://mozdev.org/pipermail/project_owners/attachments/20031230/a6846e57/test.js


More information about the Project_owners mailing list