简体   繁体   中英

Can I capture an event when a Java applet fails to load?

I know that it is possible to register for error events after an applet has loaded. (eg document.getElementById('suchAndSuch').onError(function () { ... }); ) I'd like to know if it is possible to capture an event when the applet fails to load. Ideally I'd like to get some information from that error. For example, if I try to load an applet I might see this error message:

Java Applet安全异常

I'd like to know that the applet failed to load because of security settings.

If there is not an event, is it possible to check the status of an applet from the applet tag? (ie something like document.getElementById('suchAndSuch').hadSecurityIssue )

Thank you!

No there isn't. OTOH, the JS can try:

  1. Calling a method of the applet repeatedly to check it loads OK.
  2. Call a method of a running applet which provides any error or exception output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM