]> Skullheadx's Git Forge - surf.git/commitdiff
Update deprecated JavaScript eval function
authorQuentin Rameau <quinq@fifth.space>
Sun, 17 Mar 2024 06:22:05 +0000 (07:22 +0100)
committerQuentin Rameau <quinq@fifth.space>
Sun, 17 Mar 2024 07:22:18 +0000 (08:22 +0100)
Function webkit_web_view_run_javascript has been deprecated since 2.40.

surf.c

diff --git a/surf.c b/surf.c
index b8b76c9347f0daf9481d357c5723141e255234eb..1515a579b005bb953b3fbf86534337d47df0ff0c 100644 (file)
--- a/surf.c
+++ b/surf.c
@@ -973,7 +973,8 @@ evalscript(Client *c, const char *jsstr, ...)
        script = g_strdup_vprintf(jsstr, ap);
        va_end(ap);
 
-       webkit_web_view_run_javascript(c->view, script, NULL, NULL, NULL);
+       webkit_web_view_evaluate_javascript(c->view, script, -1,
+           NULL, NULL, NULL, NULL, NULL);
        g_free(script);
 }