summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <none@none>2012-12-08 17:32:27 +0100
committerportix <none@none>2012-12-08 17:32:27 +0100
commit868d444bffe084505ea2f173e27cf1a8c81001fe (patch)
tree1c3507a6bffb09bb3b3a1400976871e92e6bb2c4 /src
parent308dcd806e1fb84af0509d64c799dcd21a0673df (diff)
downloaddwb-868d444bffe084505ea2f173e27cf1a8c81001fe.zip
Implementing wv.stopLoading
Diffstat (limited to 'src')
-rw-r--r--src/scripts.c11
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)