Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
As discussed http://markmail.org/message/nrnuw2gad5z5wupx, it would be useful to have a way to autogenerate javascript wrappers, while allowing some methods to be customized.
Here's the proposed method, from that thread:
a) ScriptableNode (or any other javascript wrapper class) implements a finishInit() method that's called by ScriptableNode.defineClass [1] after all jsfunction_ etc. have been processed.
b) finishInit uses reflection on the Node interface to define all methods that haven't been defined yet. The "not defined yet" condition looks a bit tricky but doable.
This can probably be implemented in a base JavascriptWrapper class.