Hello,
I'm trying to add support for a custom mime type in an extension, using
nsIURIContentListener. The documents are actually XML documents, so I
toughed it would be possible to do it in JS with the appropriate
components.
My component implements nsISupports, nsIURIContentListener,
nsIStreamListenener and nsISupportsWeakReference. It is registered and
it's doContent() method is call when expected. However I can't get it to
use my stream listener to do the actual loading. Here's my doContent()
code :
doContent: function(contentType, isContentPreferred, request,
contentHandler) {
dump("-- loading " + request.name + "\n");
contentHandler.value = this.QueryInterface(CI.nsIStreamListener);
return false;
}
I also tried to handle the content myself, canceling the request and
starting another one. It works, but we end up with two HTTP request for
the same resource, which I want to avoid...
Thanks for any help / ideas !
Fabrice
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network