global.html 无法从 safari-extension builder 加载 NPAPI 插件,但可以从直接链接加载
我正在为 Mac 和 Win 开发 Safari 扩展。 我的扩展是我的插件的触发点,我将其存储在 ** /Library/Internet Plug-ins/** 我的扩展的 global.html 正在通过 object 标签调用我的插件 mime 类型
问题是在 Mac 上,我通过 safari-extz-builder 插件加载我的 extz没有被调用,但是当我将相同的 global.html 拖到 safari 窗口时,它正在工作。 同样的 global.html 在 Windows 上也运行良好。
我也使用通用插件“npsimple”重复了相同的过程,这给了我相同的结果(即进行直接链接,但从扩展构建器加载失败)
我的 global.html 代码:
<html>
<body>
<object id="pluginobj" type="application/x-vnd-aplix-foo">Plugin FAILED to load</object>
<script type="text/javascript">
function foo() {
alert(document.getElementById("pluginobj").foo());
}
foo();
</script>
</body>
</html>
npsimple 的链接:
http://git.webvm.net/?p=npsimple;a=tree
我一定失踪了非常愚蠢的事情。 有什么想法吗?
TIA
Parimal Das
OSX 10.5.8 / Safari 5.0.3
I am developing a Safari extension for both Mac and Win.
My extension is a trigger point for my plugin which i am storing at ** /Library/Internet Plug-ins/**
My extension's global.html is calling for my plugins mime type by an object tag
The issue is when on Mac, I load my extz through safari-extz-builder, the plugin is NOT getting called, but when I drag the same global.html to safari window, it is working.
Also the same global.html is working fine on Windows.
I have repeated the same process with a generic plugin "npsimple" too which gave me same result (i.e. working on direct linking but failing on load from extension builder)
Code of my global.html:
<html>
<body>
<object id="pluginobj" type="application/x-vnd-aplix-foo">Plugin FAILED to load</object>
<script type="text/javascript">
function foo() {
alert(document.getElementById("pluginobj").foo());
}
foo();
</script>
</body>
</html>
Link for npsimple:
http://git.webvm.net/?p=npsimple;a=tree
I must be missing something very stupid.
Any ideas ??
TIA
Parimal Das
OSX 10.5.8 / Safari 5.0.3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现了同样的情况,我能想到的唯一解决方法是将 NPAPI 插件添加到菜单栏。它可以工作,但它似乎无缘无故地自行关闭,每次关闭时我都必须重新加载它。恼人的。
I found the same, and the only workaround I could come up with was to add the NPAPI plugin to a menu bar. It works, but it seemingly shuts itself down for no reason and I have to reload it every time it does so. Annoying.