Make theme-switching.js work with addons

NEW
Unassigned

Status

()

Firefox
Developer Tools: Framework
2 years ago
2 years ago

People

(Reporter: bgrins, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
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.
(Reporter)

Updated

2 years ago
See Also: → bug 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;
You need to log in before you can comment on or make changes to this bug.