The LiveConnect JavaScript-to-Java type conversion rules for JavaScript strings are at <http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:LiveConnect_Overview:Data_Type_Conversions:JavaScript_to_Java_Conversions#String_Values> They specifically that JavaScript strings are converted to java.lang.String for arguments of both java.lang.String and java.lang.Object types. On Mac OS X 10.4.7, though, only arguments of type java.lang.String work. java.lang.Object arguments become null. I'll send along an attachment with an example.
Created attachment 9236 [details] xcode project for applet and web page that illustrate the problem
Based on my reading of the LiveConnect documentation and a test of the provided applet, I can reproduce this issue with WebKit 418.8 and WebKit r15138.
Created attachment 16150 [details] LiveConnect enabled check I can't get LiveConnect working on any Safari version on my new MBP 10.4.10 system. Perhaps I am missing a plugin? QuickTime Plug-In 7.2 iPhotoPhotocast Quartz Composer Plug-In Verified Download Plugin Java Plug-in for Cocoa Shockwave Flash QuickTime Plug-in 7.2 Google Update One-Click Installer Plugin
(In reply to comment #3) > Created an attachment (id=16150) [edit] > LiveConnect enabled check > > I can't get LiveConnect working on any Safari version on my new MBP 10.4.10 > system. Is Safari set to run under Rosetta? Do a "Get Info" on the Safari application in the /Applications folder, and make sure the "Open using Rosetta" checkbox is unchecked. http://docs.info.apple.com/article.html?artnum=303120
Found Rosetta unchecked. Does the "LiveConnect enabled check" test work for you?
(In reply to comment #5) > Found Rosetta unchecked. > > Does the "LiveConnect enabled check" test work for you? No, it does not. Works on Firefox 2.0.0.6. Does not work on Safari 2.0.4 (419.3) with original WebKit on Mac OS X 10.4.10 (8R218). I am using a PowerPC-based PowerBook G4.
Opening javascript:alert(window.java) in Firefox 2.0.0.6 returns: [JavaPackage java] This is undefined in ToT WebKit, so it would appear that the window.java object is not available. Opera 9.22 does nothing with the alert, but the test works properly (undetectable support?).
(In reply to comment #5) > Does the "LiveConnect enabled check" test work for you? Kai, I believe your test demonstrates a different bug (no window.java object available in the DOM). Would you please open a new bug for this issue? Thanks!
BTW, the original bug is still an issue. Here's how to compile the Java source file without Xcode: $ javac LiveConnectBug.java $ jar cf LiveConnectBug.jar LiveConnectBug.class After doing that, opening example1.html from the LiveConnectBug/ directory will demonstrate the original bug.
(In reply to comment #8) > (In reply to comment #5) > > Does the "LiveConnect enabled check" test work for you? > > Kai, I believe your test demonstrates a different bug (no window.java object > available in the DOM). Would you please open a new bug for this issue? Bug 15109
Created attachment 49119 [details] proposed fix
Comment on attachment 49119 [details] proposed fix r=me
Committed <http://trac.webkit.org/changeset/55044>.