Here is how to write a simple real-time web app using Nashorn scripting and Webbit:
and the corresponding html:
pretty cool, isn't it?
PS: you can find the whole project on github here.
PPS: In terms of limitations, you may also want to check out Nashorn's multithreading story which is explained here