get a resource uri from jsm

92 Views Asked by At

I'd like to get the resource: uri for a .jsm file dynamically. The path is dynamic so I would like to refer to relative resources with the same path.

So I can load A.jsm via resource://path-to-modules/modules/A.jsm and resource://path-to-modules/modules/B.jsm, and I have B.jsm which A.jsm depends on.

So I want something like Cu.import(path.replace("A.jsm", "B.jsm"))

any idea how I would get path in the above?

0

There are 0 best solutions below