summaryrefslogtreecommitdiff
path: root/include/netsurf
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-05-05 15:38:09 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-05-05 16:00:03 +0100
commit1146f8bf49eda7f23960e2efdd6dcefb6a98b552 (patch)
tree553805b6b0c41ff73f4fea712cb9169b69efbde0 /include/netsurf
parentf3892c98fdc734a0abca136ab712c94246fe66c0 (diff)
downloadnetsurf-1146f8bf49eda7f23960e2efdd6dcefb6a98b552.tar.gz
netsurf-1146f8bf49eda7f23960e2efdd6dcefb6a98b552.tar.bz2
Add browser_window_exec
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'include/netsurf')
-rw-r--r--include/netsurf/browser_window.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/netsurf/browser_window.h b/include/netsurf/browser_window.h
index 439b0785d..77a263189 100644
--- a/include/netsurf/browser_window.h
+++ b/include/netsurf/browser_window.h
@@ -725,4 +725,16 @@ nserror browser_window_get_name(struct browser_window *bw, const char **name);
*/
nserror browser_window_set_name(struct browser_window *bw, const char *name);
+/**
+ * Execute some JavaScript code in a browsing context.
+ *
+ * Runs the passed in JavaScript code in the browsing context.
+ *
+ * \param bw The browser window
+ * \param src The JavaScript source code
+ * \param srclen The length of the source code
+ * \return Whether the JS function was successfully injected into the content
+ */
+bool browser_window_exec(struct browser_window *bw, const char *src, size_t srclen);
+
#endif