You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Java extension is not an easy task because we need to register dynamically a Java function an call it from JavaScript with instance (instantiated in the JavaScript engine).
In the example above, we need to call the process method from JavaScript with a StructuralNode instance, a Reader instance and a Map of attributes.
The JavaScript runtime has a parent and a reader object in memory but these objects are not available in Java.
The Java code is also calling the createBlock method with a StructuralNode (Java), so again we need to resolve this object in the JavaScript runtime.
Technically using a shared memory with "pointer" in the JavaScript runtime is working but I don't know if it's the best approach here.
The text was updated successfully, but these errors were encountered:
Using Java extension is not an easy task because we need to register dynamically a Java function an call it from JavaScript with instance (instantiated in the JavaScript engine).
Let's take an example:
In the example above, we need to call the
process
method from JavaScript with aStructuralNode
instance, aReader
instance and aMap
of attributes.The JavaScript runtime has a
parent
and areader
object in memory but these objects are not available in Java.The Java code is also calling the
createBlock
method with aStructuralNode
(Java), so again we need to resolve this object in the JavaScript runtime.Technically using a shared memory with "pointer" in the JavaScript runtime is working but I don't know if it's the best approach here.
The text was updated successfully, but these errors were encountered: