Bug 1387495 - dt-addon: use window object in webconsole/net/main to load stylesheets;r=jryans
From console/net/main.js we are calling loadSheet from sdk/stylesheet/utils.
This API needs a real window object to work, but now that devtools are loaded
as a system addon, by default the global object is a sandbox wrapper.
Use the window object which points to the actual Window instead.
MozReview-Commit-ID: LxDNfDiOso3
--- a/devtools/client/webconsole/net/main.js
+++ b/devtools/client/webconsole/net/main.js
@@ -33,17 +33,17 @@ var styleSheets = [
"resource://devtools/client/webconsole/net/components/response-tab.css"
];
// Load theme stylesheets into the Console frame. This should be
// done automatically by UI Components as soon as we have consensus
// on the right CSS strategy FIXME.
// It would also be nice to include them using @import.
styleSheets.forEach(url => {
- loadSheet(this, url, "author");
+ loadSheet(window, url, "author");
});
// Localization API used by React components
// accessing strings from *.properties file.
// Example:
// let localizedString = Locale.$STR('string-key');
//
// Resources: