Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I call C++ functions in JavaScript with WebKit?

I'm trying to write a native Windows (pre-Metro) application that is almost entirely HTML/JavaScript. Some googling seemed to indicate that the ways to do this were:

  1. QtWebKit
  2. WebKit
  3. Have Internet Explorer render it.

I don't want Qt as a dependency, so that rules out 1. I need to write some native code (to interact with the OS), and make those functions available to be called in the JavaScript, so that rules out 3. But while it seems possible, I don't know how to do this in just WebKit.

Note: The build environment is Visual Studio, in case its relevant.

like image 803
Vanwaril Avatar asked Feb 24 '26 23:02

Vanwaril


1 Answers

According to what you want to achieve, V8 is probably the best solution, have a look at a basic introduction

Getting Started

and you can also read about a guide about how to embed it

Embedder's Guide

like image 195
user827992 Avatar answered Feb 27 '26 11:02

user827992



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!