[webkit-help] How does javascript call native code such as c/c++?

John Yani vanuan at gmail.com
Thu Mar 15 10:39:48 PDT 2012


I think the OP wants to develop a wep application that calls his
native application's code in any browser.
Am I right?
Unfortunately, this is not possible with JS. You should look into
NPAPI (http://en.wikipedia.org/wiki/NPAPI) and NativeClient
(http://code.google.com/p/nativeclient/)



On 15 March 2012 18:04, Ryosuke Niwa <rniwa at webkit.org> wrote:
> That's done by "binding" code. You typically add new IDL file (.idl) for a
> new class you're adding. Then the build script will automatically generate
> JS*.cpp or V8*.cpp for you. You can also add a custom binding code (see
> WebCore/bindings/) per attribute/method.
>
> - Ryosuke
>
> 2012/3/15 wenmhappy <wenmhappy at 126.com>
>>
>> Hi,
>>
>>       I  want  let javascript call  native code(c/c++) to access native
>> sources, but  I don`t  know how to do it.
>>
>> Thanks for any help,
>> Best regards.
>>
>>
>>
>> _______________________________________________
>> webkit-help mailing list
>> webkit-help at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>>
>
>
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>


More information about the webkit-help mailing list