summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-11-02 10:40:29 +0100
committerportix <portix@gmx.net>2012-11-02 10:40:29 +0100
commitd2ca0500bfbee25d107e83dfadacffb7ae7635b3 (patch)
treee920d28fe1535b57c63d1939b10b2c50095003c2 /src
parent6ae8d205fa646b0b860bd23b7b23762f970b2435 (diff)
downloaddwb-d2ca0500bfbee25d107e83dfadacffb7ae7635b3.zip
Create own this object for all scripts
Diffstat (limited to 'src')
-rw-r--r--src/scripts.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/scripts.c b/src/scripts.c
index dd0ae0db..1b2a7ecf 100644
--- a/src/scripts.c
+++ b/src/scripts.c
@@ -1969,7 +1969,9 @@ static void
apply_scripts() {
for (GSList *l = m_script_list; l; l=l->next) {
JSObjectRef o = JSObjectMake(m_global_context, NULL, NULL);
- JSObjectCallAsFunction(m_global_context, l->data, o, 0, NULL, NULL);
+ JSObjectRef apply = js_get_object_property(m_global_context, l->data, "apply");
+ JSValueRef argv[] = {o};
+ JSObjectCallAsFunction(m_global_context, apply, l->data, 1, argv, NULL);
}
g_slist_free(m_script_list);
m_script_list = NULL;