diff options
author | portix <none@none> | 2012-12-08 17:32:27 +0100 |
---|---|---|
committer | portix <none@none> | 2012-12-08 17:32:27 +0100 |
commit | 868d444bffe084505ea2f173e27cf1a8c81001fe (patch) | |
tree | 1c3507a6bffb09bb3b3a1400976871e92e6bb2c4 /src | |
parent | 308dcd806e1fb84af0509d64c799dcd21a0673df (diff) | |
download | dwb-868d444bffe084505ea2f173e27cf1a8c81001fe.zip |
Implementing wv.stopLoading
Diffstat (limited to 'src')
-rw-r--r-- | src/scripts.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/scripts.c b/src/scripts.c index 50f92b0f..b2ceee38 100644 --- a/src/scripts.c +++ b/src/scripts.c @@ -107,6 +107,7 @@ static JSValueRef connect_object(JSContextRef ctx, JSObjectRef function, JSObjec static JSValueRef disconnect_object(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef* exc); static JSValueRef wv_load_uri(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef* exc); +static JSValueRef wv_stop_loading(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef* exc); static JSValueRef wv_history(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef* exc); static JSValueRef wv_reload(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef* exc); static JSValueRef wv_inject(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef* exc); @@ -120,6 +121,7 @@ static JSStaticFunction default_functions[] = { }; static JSStaticFunction wv_functions[] = { { "loadUri", wv_load_uri, kJSDefaultAttributes }, + { "stopLoading", wv_stop_loading, kJSDefaultAttributes }, { "history", wv_history, kJSDefaultAttributes }, { "reload", wv_reload, kJSDefaultAttributes }, { "inject", wv_inject, kJSDefaultAttributes }, @@ -482,6 +484,15 @@ wv_load_uri(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t arg return false; }/*}}}*/ +static JSValueRef +wv_stop_loading(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef* exc) +{ + WebKitWebView *wv = JSObjectGetPrivate(this); + if (wv != NULL) + webkit_web_view_stop_loading(wv); + return UNDEFINED; +} + /* wv_history {{{*/ static JSValueRef wv_history(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t argc, const JSValueRef argv[], JSValueRef* exc) |