This is Christian Frost's Typepad Profile.
Join Typepad and start following Christian Frost's activity
Join Now!
Already a member? Sign In
Christian Frost
Recent Activity
Hi, I use WebKit2 which may cause that my WebKitWebView does not have the "window-object-cleared" signal. Therefore it cannot be connected. I have tried to "hook" it to the "resource-load-started" with the following callback function: static void resource_load_started_cb(WebKitWebView *web_view, WebKitWebResource *resource, WebKitURIRequest *request, gpointer user_data) { JSGlobalContextRef * context =webkit_web_view_get_javascript_global_context(web_view); JSClassRef classDef = JSClassCreate(&class_def); JSObjectRef classObj = JSObjectMake(context, classDef, context); JSObjectRef globalObj = JSContextGetGlobalObject(context); JSStringRef str = JSStringCreateWithUTF8CString("CustomClass"); JSObjectSetProperty(context, globalObj, str, classObj, kJSPropertyAttributeNone, NULL); } However, when I use my CustomClass in Javascript, WebKit cannot find the class. Can someone guide me how to do this? Currently I use the Minibrowser as a sample program to implement it.
1 reply
Christian Frost is now following The Typepad Team
Feb 21, 2013