Hi, Jacob,
Thanks for the write-up.
A few things I've run into:
1. After make-ing pySCION, I got a syntax error attempting to load the
generated scion.js into the SpiderMonkey js shell. I discovered that
the generated scion.js contained a bunch of test code. I was able to
address this by appending the following to js-src/build/stitch.js:
path.join('js-lib','scion','lib','external','sax-js','examples'),
path.join('js-lib','scion','lib','external','sax-js','test'),
path.join('js-lib','scion','lib','external','xmldom','test'),
2. scion.js and its uglified counterpart seem to have gotten pretty
big since I last integrated:
Old:
97,162 scion.js
33,111 scion.min.js
Latest:
230,861 scion.js
101,262 scion.min.js
Even with the adjustment from #1 above, am I stitching in more than necessary?
3. The DOM implementation provided with SCION looks to require
getter/setter support. Unfortunately, that doesn't appear to be
supported even via es5-sham/shim in SpiderMonkey 1.7. Here's what I
tried / am running into:
js> load('es5-shim/es5-sham.js')
js> load('es5-shim/es5-shim.js')
js> load('JSON/json2.js')
js> load('pySCION/scion.js')
// load in a string assigned to a variable (s) containing a simple
scxml document
js> load('scxmldoc.js')
js> scion.ext.platformModule.platform.parseDocumentFromString(s)
es5-shim/es5-sham.js:188: ReferenceError: owns is not defined
If I attempt to correct that by adding the following:
function owns(o, p) {
return typeof p !== 'undefined' ? o != null && o.hasOwnProperty(p) :
this.hasOwnProperty(o);
}
I run into:
/es5-shim/es5-sham.js:223: ReferenceError: supportsAccessors is not defined
js> supportsAccessors = false
js> scion.ext.platformModule.platform.parseDocumentFromString(s)
es5-shim/es5-sham.js:265: getters & setters can not be defined on this
javascript engine
js> supportsAccessors = true
js> scion.ext.platformModule.platform.parseDocumentFromString(s)
es5-shim/es5-sham.js:228: ReferenceError: defineGetter is not defined
Not sure how to workaround that since I'm stuck with 1.7. Any
possibility your DOM implementation could be implemented without
dependence on defineProperty get/set?
Matt