Basically what I'm trying to do is to create a new function, which can be used in JavaScript, but it would require a string and an anonymous function to be passed as arguments. The anonymous function would also have to supply an argument of it's own.
In the JavaScript I would like to have:
addEventHandler( "eventName", function ( event ) {
// do stuff
});
and the way I'd like Java to interpret that is like so:
addEventHandler ( "eventName", event -> {
// do stuff
});
Is this possible? At all? Thank you in advance!