Closed
Bug 1036506
Opened 11 years ago
Closed 11 years ago
SDK require fails to load devtools code
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: jwalker, Unassigned)
References
Details
Not only that but if you try to work around it with
var Cu = require("chrome");
var devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
var devtools.require("devtools/foo");
Then the SDK still gets in your way.
The best workaround is this
var Cu = require("chrome");
var devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}).devtools;
var devtools["req"+"uire"]("devtools/foo");
Comment 1•11 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #0)
> Not only that but if you try to work around it with
>
> var Cu = require("chrome");
> var devtools = Cu.import("resource://gre/modules/devtools/Loader.jsm",
> {}).devtools;
> var devtools.require("devtools/foo");
This code should work now bug 1032275 is fixed. Will be in a SDK 1.17 we're releasing shortly.
Comment 2•11 years ago
|
||
I just verified that this will work in 1.17. You get a warning about a missing module but that is ignorable.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Reporter | ||
Comment 3•11 years ago
|
||
Do we need another bug so that this works:
var require("devtools/foo");
Depends on: 1032275
Comment 4•11 years ago
|
||
what exactly is that code supposed to do?
if you are trying to use the standard SDK require() method to load devtools modules, i don't think that would work because you need to configure the the loader so that it knows what "devtools/foo" maps to.
You need to log in
before you can comment on or make changes to this bug.
Description
•