Calling C++ code from JavaScript