On Tuesday, May 29, 2012 9:46:32 PM UTC+2, WebDude wrote:
I have a simple JavaScript overlay class.How do I instantiate an instance of this class from within JavaScript (JSNI)?
The whole point of overlays is that they're not real classes, they're not things that you instantiate (they "map" a JS object into the Java world), and they don't correspond to a JS "class".
So create whatever object in JS that has the properties and "methods" that the overlay "maps" to Java, and you're done.
An overlay class is only a Java "view" on JS objects, so you can manipulate it in Java as if it were a Java object.