Does anyone have experience in coding such a problem directly?
I think that I will need the following steps:
One problem that I anticipate is that the string sent to WW for checking answers is going to appear in Preview/Formatted form and would not make much sense. How do authors of other applet-based problems get around this?
This sounds right to me. Take a look at the Canvas object which is defined in the Applet API. I wrote this a while ago at the beginning of the introduction of HTML5 and haven't had a chance to expand on it or clean it up.
It was meant to present an API that looked pretty similar to the Java and Flash
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.
An example of HTML5 written by David Gage is at: