Inline Processing Java communicating with the embedding Javascript in both directions
Mouse position as sent from Processing Java to a Javascript function:
,
Click document to call a Java function from the embedding JS.