A number of applications/libs use JNI with platform-specific implementations of native Java methods.
This can currently be done with bck2brwsr already with a JavaScript implementation, but it requires the addition of an annotation to the Java code.
By providing a simple mechanism in the bytecode2javascript generator, we can as a last resort, when there is on annotation on a native method, check if there is a javascript method that has the signature of the native method, and if so invoke it.
A number of applications/libs use JNI with platform-specific implementations of native Java methods. This can currently be done with bck2brwsr already with a JavaScript implementation, but it requires the addition of an annotation to the Java code. By providing a simple mechanism in the bytecode2javascript generator, we can as a last resort, when there is on annotation on a native method, check if there is a javascript method that has the signature of the native method, and if so invoke it.