Can I use XPCOM to read browser.startup.homepage in JS in
netError.xhtml ?

        alert("Hurray!!");

        var homePageURL =
Components.classes["@mozilla.org/preferences-service;1"].

getService(Components.interfaces.nsIPrefService).getBranch("").
                  getComplexValue("browser.startup.homepage",
Components.interfaces.nsISupportsString).data.trim();

        alert(homePageURL);

        setTimeout("window.content.location.href='"+homePageURL+"'",
10000);

I see "Hurray!!". But then nothing ...

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

Reply via email to