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

Skip to first unread message

Brian Grinstead

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.

firefox-dev mailing list
Reply all
Reply to author
0 new messages