On 2013-05-18, at 06:09 , David Rajchenbach-Teller <dtel...@mozilla.com> wrote:
> Hi everyone, > > As part of the ongoing effort to make (Chrome) Workers useful for > platform refactorings, we have been working on a lightweight module > loader for workers (bug 872421). This loader implements a minimal > version of CommonJS modules, aka require.js. > > Example: [znip] > > Once this loader lands, we will need some convention for where to place > modules for workers. Unfortunately, main thread modules (both .jsm and > Jetpack) can generally not be used by worker, due to different module > semantics, and more importantly due to the fact that most main thread > modules depend indirectly on XPCOM/XPConnect. This might kill my dream of having a debuggable worker via require'ing a debug-server.js module. It's certainly feasible to recreate a basic debug-server that conforms to the restrictions of workers though. We'd need a WebSocket-only transport anyway. > Given that main thread modules are rooted in > resource://gre/modules/ > and Jetpack modules are rooted in > resource://gre/modules/commonjs/ > I would like to place worker modules in > resource://gre/modules/workers/ I think this layout makes sense. ~ robcee _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform