On 10/17/2012 04:01 PM, Jim Porter wrote: > the documentation only seems to say how to use httpd.js in xpcshell. Surely > there's a simpler way to get started.
Historically httpd.js was designed so you could use it as an XPCOM component, fully abstracted from anything. It's possible that's broken over the years, although I don't doubt this could be pretty easily fixed if it's broken. I think you could also use it as a purely inline script in a XUL document, or whatever. You'd pollute the global object, but other than that it should work just as well as as-a-component use. I believe we also tweaked it such that you could import it with Components.utils.import, and we'd export the HttpServer symbol that gave you access to everything. Any of these methods should work, or at least should be minimal-changes away from working. Just make sure to yield so asynchronous callbacks and such will work, and you should be good. Jeff _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform