jeresig / env-js Goto Github PK
View Code? Open in Web Editor NEWA pure-JavaScript browser environment.
Home Page: http://groups.google.com/group/envjs
A pure-JavaScript browser environment.
Home Page: http://groups.google.com/group/envjs
They don't work anymore, all the links point to non existing places on github.
a pedantic note regarding htmlparser.js:
if ( !doc ) {
if ( typeof DOMDocument != "undefined" )
doc = new DOMDocument();
else if ( typeof document != "undefined" && document.implementation && document.implementation.createDocument )
doc = document.implementation.createDocument("", "", null);
else if ( typeof ActiveX != "undefined" )
doc = new ActiveXObject("Msxml.DOMDocument");
} else
that will dereference a null doc a few lines down if it cannot instantiate doc. It "should" have a final else which throws an exception.
kaboom:
pulled from github today, about 15 minutes ago....
stephan@tiny:~/cvs/env-js$ make
Exception in thread "Thread-0" org.mozilla.javascript.EcmaError: TypeError: Cannot call method "createEvent" of null
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3566)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3544)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3572)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3591)
at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3610)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2159)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:117)
at org.mozilla.javascript.gen.c2._c4(Unknown Source)
at org.mozilla.javascript.gen.c2.call(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
at org.mozilla.javascript.gen.c2._c120(Unknown Source)
at org.mozilla.javascript.gen.c2.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at org.mozilla.javascript.gen.c2.call(Unknown Source)
at org.mozilla.javascript.Context$1.run(Context.java:488)
at org.mozilla.javascript.Context.call(Context.java:499)
at org.mozilla.javascript.Context.call(Context.java:486)
at org.mozilla.javascript.JavaAdapter.callMethod(JavaAdapter.java:548)
at adapter1.run(<adapter>)
at java.lang.Thread.run(Thread.java:619)
stephan@tiny:~/cvs/env-js$ less Makefile
stephan@tiny:~/cvs/env-js$ make run-rhino
echo "load('src/env.js');window.location='test/index.html';" | java -jar rhino/js.jar
Rhino 1.7 release 2 PRERELEASE 2008 07 28
js> test/index.html
js>
Exception in thread "Thread-0" org.mozilla.javascript.EcmaError: TypeError: Cannot call method "createEvent" of null (src/env.js#29)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3566)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3544)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3572)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3591)
at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3610)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2159)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3142)
at script(src/env.js:29)
at script.makeRequest(src/env.js:737)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2486)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
at org.mozilla.javascript.Context$1.run(Context.java:488)
at org.mozilla.javascript.Context.call(Context.java:499)
at org.mozilla.javascript.Context.call(Context.java:486)
at org.mozilla.javascript.JavaAdapter.callMethod(JavaAdapter.java:548)
at adapter1.run(<adapter>)
at java.lang.Thread.run(Thread.java:619)
i tried with:
Rhino 1.7 release 2 PRERELEASE 2008 07 28
Rhino 1.7 release 2 2010 01 20
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.