2

I am using Java Plug-in and JSObject for DOM/JS <-> Applet communication.

I am using Eclipse IDE and at development time, I like the simplicity of Run/Debug As->Applet to launch and quickly see my layout/changes reflected in the running applet.
But I need to use JSObject to get some data that will come from the parent DOM/JS.

What is the best way to use Applet Viewer in this case?

One thing I can think of is to fake the DOM/JS calls in a delegate/wrapper and pass back mock objects if running under applet viewer (Basically if cannot obtain JSObject.getWindow)

I dont do a lot of applet development so was wondering if there is a better way to handle this? (Seems like this should be a common scenario)

Amol Katdare
  • 6,740
  • 2
  • 33
  • 36
  • *"(Seems like this should be a common scenario)"* There's no accounting for the way things seem. About 1 in 20 of current Java jobs relate to client-side technologies (as opposed to server-side). Applets are a minor part of the rich client spectrum. Applets that use the `JSObject` would be around 1 out of fifty instances. – Andrew Thompson Feb 06 '12 at 23:21
  • :) @ Andrew I meant common scenario among those 5-10 people in the world who might be following the jsobject/applet SO tags that I tagged the question with. – Amol Katdare Feb 07 '12 at 00:05
  • Like the joke, but honestly, shoehorning the JS object into a tool that does not even support JavaScript (or even, for that matter, the applet based `showDocument()`)? Good luck with that. If I were (crazy enough to be) attempting this, I'd probably start with the code of [Appleteer](http://pscode.org/appleteer/) then look to the 'Voodoo API' for the rest. – Andrew Thompson Feb 07 '12 at 12:41

0 Answers0