Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7012107

Need nonblocking API to check applet status from javascript

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P2
    • 7
    • 7
    • deploy
    • b130
    • generic
    • generic
    • Verified

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              ccheung Calvin Cheung
              igor Igor Nekrestyanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: