jQuery and Java applets

前端 未结 1 1068
无人共我
无人共我 2021-02-14 08:43

I\'m working on a project where we\'re using a Java applet for part of the UI (a map, specifically), but building the rest of the UI around the applet in HTML/JavaScript, commun

相关标签:
1条回答
  • 2021-02-14 09:09

    For the first issue, how about trying

    alert( $("#applet-id")[0].foo() );
    

    For the second issue here is a thread with a possible workaround.

    Quoting the workaround

    // Prevent memory leaks in IE
    // And  prevent errors on refresh with events  like mouseover in other  browsers
    // Window isn't included so as not to unbind existing unload events
    jQuery(window).bind("unload",
    function() {
            jQuery("*").add(document).unbind();
    });
    

    change that code to:

    // Window isn't included so as not to unbind existing unload events
    jQuery(window).bind("unload",
    function() {
            jQuery("*:not('applet, object')").add(document).unbind();
    });
    
    0 讨论(0)
提交回复
热议问题