env-js icon indicating copy to clipboard operation
env-js copied to clipboard

Basic Windows support using Rhino engine

Open chrisnash opened this issue 12 years ago • 0 comments

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.

chrisnash avatar Apr 18 '12 23:04 chrisnash