Calling JavaScript functions from C++ with WebKit
June 19, 2007
I figured out how to call JavaScript functions from C++ with WebKit today.
WebCore::KJSProxy* js = frame->scriptProxy(); if (js) { js->evaluate(filename, linenum, scriptText, Node); //filename can be "" and linenum can be 0 if you want to just execute the line in scriptText }
Now the next task: calling C++ objects from JavaScript…