On Apr 3, 10:13 am, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
> Jens Sorensen wrote:
> > The problem occurs when I drag a html document from the desktop into
> > the browser which contains attribute that utilize my protocol (e.g,
> > src="abc:someimage" ). "NewURI" will be called for each of the
> > elements that utilize the custom protocol handler as expected however
> > it will not be follow by a call to "NewChannel" thus I wont get a
> > chance to fetch data.
>
> Should be working... Which Gecko version are you using, if I might ask?  What
> sort of URI objects are you returning?  If this is trunk, what are your 
> protocol
> flags?
>
> -Boris


Hi Boris,
Im using firefox version 2.0. and Gecko SDK 1.8.0.4

In NewURI I basically just create an instance of
""@mozilla.org/network/simple-uri;1", SetSpec(aSpec) return the new
URI.

After NewURI has been called then no more methods will be called on my
interface.

I also noticed that if I create a toolbar using XUL then I see the
same problem with the style, e.g

<?xml-stylesheet href="abc:mycss.css" style="text/css"?>

NewURI will only be called but not NewChannel. However I change href
to href="mycss.css" then it works in the sense that the CSS will be
loaded correctly and keep in mind that in my "mycss.css" file I'll
refer to background images using url(abc:someimage) and they will be
displayed correctly (e.g, I'll grab them from the resource dll ). I
can see that NewURI and NewChannel is called for each of the "abc:"
resources that it encounter in the css file.

but again, why doesnt "href="abc:mycss.css" cause a channel be
created.

In regards to protocol flags:

GetScheme returns "abc"
GetDefaultPort is -1
GetProtocolFlags is URI_NOAUTH
AllowPort returns PR_FALSE

-Jens

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

Reply via email to