-
Enhancement
-
Resolution: Fixed
-
P3
-
7
-
b130
-
generic
-
generic
-
Verified
Follow up to CR7012107 to support the same feature in NPAPI based plugin. That is FF and Chrome.
Quoted from CR7012107,
Problem:
Web page needs to call into applet from javascript as soon as it is possible.
Web page and browser should be alive at any time.
Currently the only way to archive this seem to have applet call js when it is ready first and this could trigger other actions.
But this is not always possible as js side may be not ready too.
Attempt to call applet from js may stuck until applet gets to the point it can handle js calls.
However, this may take unpredictable time as applet need resources loaded from network.
Stuck javascript call blocks js engine (it is typically singlethreaded) and may even block rendering engine.
Thus making browser hardly usable.
Should have better way to detect when applet is ready and what is current state (launching, live, shutting down, dead, etc).
Possible "external" API:
- non blocking access to state property on the applet object
- onload/onerror handlers to be called when applet started or failed
Implementation wise these properties/handlers must be handled in the native code or browser VM.
I.e. these are fake property names that are not accessible from inside the applet itself as applet fields/methods.
This could be opt-in functionality (i.e. applet need to be deployed with some parameter, this way these properties will not
cause backward compatibility issues due to shadowing of real applet fields) but it could be default mode for Applet2.
Quoted from CR7012107,
Problem:
Web page needs to call into applet from javascript as soon as it is possible.
Web page and browser should be alive at any time.
Currently the only way to archive this seem to have applet call js when it is ready first and this could trigger other actions.
But this is not always possible as js side may be not ready too.
Attempt to call applet from js may stuck until applet gets to the point it can handle js calls.
However, this may take unpredictable time as applet need resources loaded from network.
Stuck javascript call blocks js engine (it is typically singlethreaded) and may even block rendering engine.
Thus making browser hardly usable.
Should have better way to detect when applet is ready and what is current state (launching, live, shutting down, dead, etc).
Possible "external" API:
- non blocking access to state property on the applet object
- onload/onerror handlers to be called when applet started or failed
Implementation wise these properties/handlers must be handled in the native code or browser VM.
I.e. these are fake property names that are not accessible from inside the applet itself as applet fields/methods.
This could be opt-in functionality (i.e. applet need to be deployed with some parameter, this way these properties will not
cause backward compatibility issues due to shadowing of real applet fields) but it could be default mode for Applet2.
- relates to
-
JDK-7012107 Need nonblocking API to check applet status from javascript
- Closed
-
JDK-7019562 Applet status callback support for NPAPI plugin
- Closed
-
JDK-7019563 Applet status callback support for IE plugin
- Closed