PSA - Use AppConstants.BROWSER_CHROME_URL instead of directly referencing browser.xul in the frontend

22 views
Skip to first unread message

Brian Grinstead

unread,
Jul 24, 2018, 7:22:20 PM7/24/18
to firefox-dev
Prior to Bug 1476333, we would access the browser chrome URL from the frontend in the following ways:

1) Hardcoded "chrome://browser/content/browser.xul"
2) Hardcoded "chrome://browser/content/" which redirects to "chrome://browser/content/browser.xul"
3) getBrowserURL() from utilityOverlay.js which returns (1)
4) Services.prefs.getCharPref("browser.chromeURL") which returns (2)

These have now been replaced by a single preprocessor directive which is available via AppConstants. If you need to reference browser.xul, please use `AppConstants.BROWSER_CHROME_URL` instead. This makes it easier to find and fix issues with loading the browser window as an HTML document since the URL only needs to change in one place.

Thanks,
Brian
_______________________________________________
firefox-dev mailing list
firef...@mozilla.org
https://mail.mozilla.org/listinfo/firefox-dev
Reply all
Reply to author
Forward
0 new messages