[Jslib] Mapping chrome URLs to file paths

David Huynh dfhuynh at mit.edu
Thu Nov 25 14:57:41 EST 2004


A solution:

var chromeRegistry =
	Components.classes["@mozilla.org/chrome/chrome-registry;1"]
		.getService(Components.interfaces.nsIChromeRegistry);
var uri =
	Components.classes["@mozilla.org/network/standard-url;1"]
		.createInstance(Components.interfaces.nsIURI);
uri.spec = "chrome://some-extension/content/foo.xul";

var url = uri.QueryInterface(Components.interfaces.nsIURL);
var path = chromeRegistry.convertChromeURL(url);

David


Pete Collins wrote:
> 
>> Hey, does anybody know how to map chrome URLs to file paths in the 
>> newest Firefox? jslib doesn't seem to work anymore for that.
>>
>>
> 
> Would you mind filing a bug so it stays on my radar?
> 
> Thanks
> 
> --pete
> 


More information about the Jslib mailing list