If a module, say sdk/notifications attempts to require("chrome") the default resolve function for the loader decides to try to load that as sdk/chrome, which fails.
My blog post has a workaround to solve this but we should fix this in the loader.
So, using the code from that blog post, it works just fine if you require("sdk/notifications"), but it fails when I try to require("sdk/selection"), with Scratchpad logging the following error:
Exception: Trying to load a non-local URI.
Does selection just have different requirements, causing the workaround from the blogpost to not apply? Is something else broken?
With the merging of bug 858278, "chrome" usage outside of the SDK environment now works and is tested.
Wes, regarding sdk/selection failing, that looks due to console/traceback usage, which includes toolkit/loader circular deps, requiring to explicitly map toolkit/loader in the loader constructor.
Bug 961194 should fix that!