r9494 - in helma-ng/trunk/src/org/helma: javascript util
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: hannes
Date: 2009-01-29 15:21:47 +0100 (Thu, 29 Jan 2009)
New Revision: 9494
Added:
helma-ng/trunk/src/org/helma/util/ScriptableWrapper.java
Modified:
helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java
Log:
Add ScriptableWrapper host class to allow easy implementation of wrappers in JS.
Details at http://dev.helma.org/trac/helma/changeset/9494
Modified: helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java
===================================================================
--- helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java 2009-01-29 10:34:54 UTC (rev 9493)
+++ helma-ng/trunk/src/org/helma/javascript/RhinoEngine.java 2009-01-29 14:21:47 UTC (rev 9494)
@@ -82,6 +82,7 @@
StaticMethods.init(topLevelScope);
ScriptableList.init(topLevelScope);
ScriptableMap.init(topLevelScope);
+ ScriptableObject.defineClass(topLevelScope, ScriptableWrapper.class);
ScriptableObject.defineProperty(topLevelScope, "__name__", "global",
ScriptableObject.DONTENUM);
evaluate(cx, getScript("global"), topLevelScope);
Added: helma-ng/trunk/src/org/helma/util/ScriptableWrapper.java