I have a page with a JS Function called test (e.g.), and, in one page of my app I have to open a Java Applet.
In google chrome, it opens as an embed element, and in firefox in an object.
Sometimes, in my applet, I have to call my JS function to do something in the page. I doing this with:
applet.getAppletContext().showDocument(new URL("javascript:window.test();"));
In browser that use the object, this code work like a boss, but, if it use embed, it do nothing, trowing a exeption in Browser console, saying that the Window does not have a “test” function.
I think thi is some trouble with embed context and document context, but I dont know how to fix it, or, if it is “fixable”.
So, I like to know if is there any workaround to make it work.
thanks in advance.
I found the problem.
A minor update of chrome solve it. I dont know if the problem was in Webkit or in chrome itself, but, now it works.