It was meant to present an API that looked pretty similar to the Java and Flash
applet API, but as you observe the problem is actually simpler with HTML5. It will provide you with the tricks you need to preserve state in the javaScript applet and how to pass the result back to WeBWorK through ans_rule(s).
I'm not sure what kind of data you are passing back to WeBWorK. In the applets I wrote I passed the answer back in the same format that a student would use
to enter the answer. If the answer is being passed back as TeX things could get
a bit trickier.
-- Mike
An example of HTML5 written by David Gage is at: