Using Spidermonkey as a browser JS content back-end
[email protected] Sat, 25 Mar 2017 08:33:30 -0700 (PDT)
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
Hey folks, I've been looking around for information about this but the documentation on embedding Spidermonkey ends with a simple "hello world" with a bunch of shortcuts taken. I'm looking to see if it is possible to use SpiderMonkey as a standalone shared library to serve as a back-end component for Pale Moon (which currently uses an in-tree version like Firefox does). Because we've forked off, it currently requires re-implementing what is already implemented in Spidermonkey, and apart from the obvious challenges dealing with refactoring and DOM changes that are woven in, I'm looking into ways to use later Spidermonkey versions to specifically handle web content scripts - potentially separated from chrome scripts. There is very little point in inventing the wheel twice here, IMHO; web content will continue to want to use the latest shinies, but our chrome won't need that. It seems to me it should be possible to transplant or co-include later Spidermonkey engines for web content since they are able to be used standalone, and that way keep using a central implementation of JS as will be maintained for Firefox (even after Rust becomes a thing). Unfortunately, there's no real information that I found about how to do such a thing. I'd appreciate any insights from people who may have done this before, or are more familiar with embedding Spidermonkey. M.C.