[webkit-dev] about script plugin

张正和 zzh18918 at yahoo.com.cn
Tue Sep 29 03:18:08 PDT 2009


Hello all
            Now, I have a problem and I don't konw how to solve it, I hope you help me, thank you!
            I have written a scripting plugin with NPAPI and this plugin has some properties and methods. it has a "intValue" property and two methods of "getValue" and "setValue". Now I don't konw when and where to call the functions("NPN_Invoke()", "NPN_GetProperty()") in NPAPI , Could you give me a example?
thank you!
 
This is my web page for testing object plugin,please see the HTML code:
testObject.htm
<html>
<head>
<title>plugin example</title>
<script type="text/javascript">
function fun()
{
        elem = document.getElementById("para1");
 alert(elem.intValue);
 var value = 5;
 elem.setValue(value);
 var intValue = elem.getValue();
 alert(intValue); 
}
</script>
</head>
<body>
<object id="para1" type="clsid:72E6F181-D1B0-4C22-B0D7-4A0740EEAEF5">
        <param name="bgcolor" value="#c6cfd0" />
        <param name="jad" value="Mp3/TestSound.jad" />
        <param name="jar" value=" Mp3/TestSound.jar" />
</object>
<button onclick="fun();">Button</button>
</body>
</html>



      ___________________________________________________________ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090929/72bae325/attachment.html>


More information about the webkit-dev mailing list