From b0ba2bf4c319bd5bfbbcf60bec86db2cb0c7088b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E5=85=8B?= Date: Wed, 10 Oct 2012 01:17:41 +0800 Subject: [PATCH] =?UTF-8?q?npapi=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _posts/2010/2010-10-19-getting-started-with-npapi-plugin.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_posts/2010/2010-10-19-getting-started-with-npapi-plugin.md b/_posts/2010/2010-10-19-getting-started-with-npapi-plugin.md index acc34bd..40c9b8e 100644 --- a/_posts/2010/2010-10-19-getting-started-with-npapi-plugin.md +++ b/_posts/2010/2010-10-19-getting-started-with-npapi-plugin.md @@ -9,6 +9,12 @@ tags: - C --- +2012-10-10 更新:https://code.google.com/p/chromium/issues/detail?id=139816 Chrome22之后貌似完全放弃10.5 Carbon之类的支持,所以Event Model需要进行设置,否则NPAPI插件在Chrome22下无法加载。NPP_New函数中进行如此设置 +{% highlight c %} + browser->setvalue(instance, NPPVpluginEventModel, (void *)NPEventModelCocoa); +{% endhighlight %} +----- + 最近需要写一个Mac平台上的简单的跨浏览器的插件,需要在js中调用本地方法,而npapi满足此要求。 NPAPI就是Netscape Plugin Application Programming Interface的缩写了,虽然Netscape已经去了,但是这个却被沿用下来,在各大浏览器中都得以实现。还是纪念下曾经的浏览器的鼻祖啊。