env-js
env-js copied to clipboard
Basic Windows support using Rhino engine
This pull request aims to get the current envjs to function from the command-line using the included Rhino platform. Three basic changes:
- "file:" URL formatting corrected (taken from the first two commits in moschel's pull request https://github.com/thatcher/env-js/pull/23 ).
- simple envjs.bat and debug.bat in the bin folder to launch under Rhino.
- bug fix (should apply to any Rhino instance, not just Windows) in Envjs.localXHR. Pattern matching was being performed on the URL in order to determine a content type, but when running under Rhino the URL parameter is a java.net.URL, not a string.
Basic envjs example (for example a simple test.html file, window.location="test.html"; in test.js, then "bin\envjs test.js") works on Windows after these three changes.