hooking onloadfunctions should be done by script.js.

This commit is contained in:
Enno Boland (tox) 2009-10-07 15:00:20 +02:00
parent d3d32fd6c7
commit 04173f6661

3
surf.c
View File

@ -699,9 +699,6 @@ windowobjectcleared(GtkWidget *w, WebKitWebFrame *frame, JSContextRef js, JSObje
filename = g_build_filename(workdir, "script.js", NULL); filename = g_build_filename(workdir, "script.js", NULL);
if(g_file_get_contents(filename, &script, NULL, &error)) { if(g_file_get_contents(filename, &script, NULL, &error)) {
script = g_strdup_printf("window.addEventListener"
"('DOMContentLoaded', function () { %s }, true);",
script);
jsscript = JSStringCreateWithUTF8CString (script); jsscript = JSStringCreateWithUTF8CString (script);
JSEvaluateScript (js, jsscript, JSContextGetGlobalObject(js), NULL, 0, &exception); JSEvaluateScript (js, jsscript, JSContextGetGlobalObject(js), NULL, 0, &exception);
} }