I'm having trouble processing events from a webEngine in Nashorn. Despite setting up the code to handle the "load" event, nothing is being printed or indicating that any events are triggering from the webEngine.
#!/usr/bin/jjs -fx
engine = (v=new(s=javafx.scene).web.WebView).engine
content_dir = __DIR__.replace('./','html/');
page = 'file://' + content_dir + 'index.html';
engine.onAction = function(){print("page loaded");};
engine.load(page);
$STAGE.scene=new s.Scene(v);
Although the page loads correctly, I am not receiving any events from the engine. I've looked into Java documentation for guidance, but it seems that in Nashorn only setting onAction should be sufficient. This situation has left me puzzled.