Calls from Applet using JSObject not working. The code below shows the applet calls: private void showMessage(String str) { JSObject root = JSObject.getWindow(HelloApplet.this); JSObject document = (JSObject)(root.getMember("document")); JSObject body =(JSObject)(document.getMember("body")); JSObject br = (JSObject)(document.call( "createElement", new Object[] { "br" })); body.call("appendChild", new Object[] { br}); JSObject text = (JSObject)(document.call( "createTextNode", new Object[] { str })); body.call("appendChild", new Object[] { text}); }
Created attachment 7234 [details] Test page with Java jar file and source code. For some reason, the test case can not be loaded from the local file system, it must be hosted on a web server. When loading from the local file system, the jar is not loaded. It is found, though, as the <applet> icon is different if the jar file is missing altogether.
Created attachment 7235 [details] patch The wrong class name was being used when converting from the Java JSObject to the javascript object, and the wrong signature was being used for getting the FieldID, thus it never found it. Information about signatures used with GetFieldID (JNI call), see http://www.cs.fit.edu/~ryan/java/language/jni.html
Comment on attachment 7235 [details] patch This fix looks great! Can we get a test case for the "manual tests" directory?
(In reply to comment #3) > Can we get a test case for the "manual tests" directory? Can an http test be written for it, or does DumpRenderTree not do applets?
(In reply to comment #4) > Can an http test be written for it, or does DumpRenderTree not do applets? We haven't been able to get DumpRenderTree working with Java.