commit 5e591b89a1879941a8bde2f0959f658cfa4732d4
Author:     Quentin Rameau <quinq@fifth.space>
AuthorDate: Sun Mar 17 07:22:05 2024 +0100
Commit:     Quentin Rameau <quinq@fifth.space>
CommitDate: Sun Mar 17 08:22:18 2024 +0100

    Update deprecated JavaScript eval function
    
    Function webkit_web_view_run_javascript has been deprecated since 2.40.

diff --git a/surf.c b/surf.c
index b8b76c9..1515a57 100644
--- 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);
 }
 

Reply via email to