Open Bug 1212975 Opened 9 years ago Updated 2 years ago

Make theme-switching.js work with addons

Categories

(DevTools :: Framework, defect)

defect

Tracking

(Not tracked)

People

(Reporter: bgrins, Unassigned)

References

Details

Not sure if it's calls to Services, Components, or what, but apparently theme-switching.js doesn't work with SDK addons.  Usually this file is loaded as a <script> tag, so maybe that's the issue.

Maybe the call to hiddenDOMWindow in https://dxr.mozilla.org/mozilla-central/source/devtools/client/shared/theme-switching.js#49?
Or Services: https://dxr.mozilla.org/mozilla-central/source/devtools/client/shared/theme-switching.js#113
Or Components: https://dxr.mozilla.org/mozilla-central/source/devtools/client/shared/theme-switching.js#103

Anyhow, we should make it easy for addons to use the theme-switching functionality.
See Also: → 1111047
If access to Components is the problem but we do have SDK require, we can do something like:

   var Components_ = require ? require("chrome").components : Components;
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.