对于 CheerpJ 脚本:在同一页面上同时使用 <cheerjp-applet> 和 <applet>

For CheerpJ script: Using both <cheerjp-applet> and <applet> on same page

我与 Alessandro Pignotti (@alexp-sssup) https://gitter.im/leaningtech/cheerpj?at=5f189bf76279c91f420801af

关于如何获得 Java applet 字节码以在当今的浏览器中与 CherrpJ 一起工作。

希望 this post 中引用的两个示例可以作为其他人的指南,这些人可能也正在努力获得 java applet 转换的基础知识,并使用 CheerpJ。

正如我在那里提到的,我现在将这个后续问题放在 Whosebug 中:

我希望获得 this page to work in which I am trying to run the same byte-code with both the <cheerjp-applet> and <applet> tags on the same page. However the page never loads properly. The best I can achieve is (with page loading seeming to hang) to force some hung script to stop, which then often ends up bringing the CheerjP button up, but I have yet to the get button in the original applet to show on the same page (in a java-enabled browser-setup where the legacy applet does work properly from this 页)。有时浏览器甚至在 Cheerpj 脚本开始工作之前就完全挂起。

所以我的问题是:我正在尝试的事情是否可能,如果可能的话,我的第一次尝试可能有什么问题?

P.S.: Whosebug 标签 [cheerpj] 不存在,所以 Gitter 上使用它的建议对我来说失败了:我没有1500 的声誉 :( !!! 由于非常彻底的网络搜索显示除了我在本文开头提到的 Gitter CheepJ 房间中的内容之外,很少有关于 CheerpJ 的深入技术讨论 post,我不确定如何将讨论转移到 Whosebug 的尝试将会继续下去。

CheerpJ 不支持您要实现的目标。当 CheerpJ 启动时,它将自动替换任何包含 Java 小程序的 <applet><object><embed> 标记并在内部执行它们。特殊的前缀标签,例如 <cheerpj-applet> 旨在避免本机插件在安装时意外执行。

我们不打算在未来支持这个用例,因为对于绝大多数用户来说,本机 Java 插件无论如何都不再工作了。

您可以考虑使用两个 <iframe> 标签来使用 2 个独立页面获得您想要的行为。