Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Webkit and PlugIns: (4 Items)
   
Webkit and PlugIns  
Hi everybody,

I am learning/trying to develop PlugIn for Webkit. And I have a problem, Webkit loads/initialize the Plugin but don't 
calls the function of the plugin. So I have tried something else. I build this Plugin for Firefox Win32 there was needet
 to create an *.xpt File which has the information what kind of funktions do the Plugin use and it has to go to the usr/
AplicationData/Mozilla/Plugins directory where also the shared *.dll of Plugin are. Then the Plugin works and the 
Browser can handle with it via JavaScript. Then I tryed it for Safary on Win32 and there I have the same problem like 
with the Webkit on QNX. 
The Plugin is loaded/initialized but no fuctions are called! 
How can I let the Webkit know what kind of Functions does the Plugin use/have, on QNX?
IfI call a function via JavaScript the return is always undefined.

Can any one help?

Thanks.

RE: Webkit and PlugIns  
The QNX WebKit port supports the Netscape Plugin API (NPAPI). The set of
functions called is defined by the API.

For an example, see:

http://community.qnx.com/integration/viewvc/viewvc.cgi/webkit/trunk/WebC
ore/plugins/Gf/sample-plugin/?root=web-browsers&system=exsy1001

-----Original Message-----
From: Heinrich Ziegenhagel [mailto:community-noreply@qnx.com] 
Sent: Wednesday, February 24, 2010 11:53 AM
To: general-web_browsers
Subject: Webkit and PlugIns

Hi everybody,

I am learning/trying to develop PlugIn for Webkit. And I have a problem,
Webkit loads/initialize the Plugin but don't calls the function of the
plugin. So I have tried something else. I build this Plugin for Firefox
Win32 there was needet to create an *.xpt File which has the information
what kind of funktions do the Plugin use and it has to go to the
usr/AplicationData/Mozilla/Plugins directory where also the shared *.dll
of Plugin are. Then the Plugin works and the Browser can handle with it
via JavaScript. Then I tryed it for Safary on Win32 and there I have the
same problem like with the Webkit on QNX. 
The Plugin is loaded/initialized but no fuctions are called! 
How can I let the Webkit know what kind of Functions does the Plugin
use/have, on QNX?
IfI call a function via JavaScript the return is always undefined.

Can any one help?

Thanks.





_______________________________________________

General
http://community.qnx.com/sf/go/post48194
Re: RE: Webkit and PlugIns  
Hi,

thank you for you fast answer.
I had a look on the sample-plugin and it looks to me very similar like the PlugIn I have made for Firefox (np_entry, 
npn_gate... are the same). But I have still one question is it not posible to call PluginFunctions via JavaScript. I "
think" NetscapeAPI has the interface to call via JavaScript functions from Plugin. 
Example:
<object id="simpleplugin" type="application/simple-plugin" class=hiddenObject></object><br>

<script>
var embedPlug = document.getElementById('simpleplugin');

function show(arg)
{
  document.getElementById("result").innerHTML += "<p>" +  arg + "</p>";
}

if (embedPlug)
{	  
  show("plug.version = " + embedPlug.version); <!--version is a func in Plugin-->
}


Of course needs the Plugin to include the Java interface.
But maybe I am mixing this with extensions.

If I interpret you answer and the code of Webkit it means to me that it is not posible to call functions via JavaScript 
form a Plugin "Scriptable Plugin". Is it realy only posible to talk between Webkit and Plugin with defined Functions in 
the NAPI like Mouseover, Mouseclik, Loadurl.

Thank You! 
RE: RE: Webkit and PlugIns  
It is possible to call into a plugin using Javascript. You need to
create a mechanism to do this as part of your plugin. This is how the
jnext plugin works. See the web-browsers Foundry27 project home page
news item:

  "Javascript Native Extensions ported to QNX
  Do you want to invoke any local executable or interface to any native
functionality using 
  Javascript on your WebPage? Then the Javascript Native Extensions
framework is what you need. 
  The work done by http://www.jnext.org has been ported to QNX. The
source code is available 
  here:
http://community.qnx.com/svn/repos/web-browsers/3rdparty/trunk/jnext-1.0
.8.3  "

Jnext is just an NPAPI based plugin with Javascript glue at the front
end. You could look into the source code and use some of the same ideas
in your plugin.

Max

-----Original Message-----
From: Heinrich Ziegenhagel [mailto:community-noreply@qnx.com] 
Sent: Thursday, February 25, 2010 8:01 AM
To: general-web_browsers
Subject: Re: RE: Webkit and PlugIns

Hi,

thank you for you fast answer.
I had a look on the sample-plugin and it looks to me very similar like
the PlugIn I have made for Firefox (np_entry, npn_gate... are the same).
But I have still one question is it not posible to call PluginFunctions
via JavaScript. I "think" NetscapeAPI has the interface to call via
JavaScript functions from Plugin. 
Example:
<object id="simpleplugin" type="application/simple-plugin"
class=hiddenObject></object><br>

<script>
var embedPlug = document.getElementById('simpleplugin');

function show(arg)
{
  document.getElementById("result").innerHTML += "<p>" +  arg + "</p>";
}

if (embedPlug)
{	  
  show("plug.version = " + embedPlug.version); <!--version is a func in
Plugin-->
}


Of course needs the Plugin to include the Java interface.
But maybe I am mixing this with extensions.

If I interpret you answer and the code of Webkit it means to me that it
is not posible to call functions via JavaScript form a Plugin
"Scriptable Plugin". Is it realy only posible to talk between Webkit and
Plugin with defined Functions in the NAPI like Mouseover, Mouseclik,
Loadurl.

Thank You! 



_______________________________________________

General
http://community.qnx.com/sf/go/post48270