summaryrefslogtreecommitdiff
path: root/content/content.h
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-05-05 15:37:56 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-05-05 16:00:03 +0100
commitf3892c98fdc734a0abca136ab712c94246fe66c0 (patch)
treec7ea397b8801893f6aa4c751ef974390f5488648 /content/content.h
parentec0028bdb96a03f83055f2798c498a36142d6b03 (diff)
downloadnetsurf-f3892c98fdc734a0abca136ab712c94246fe66c0.tar.gz
netsurf-f3892c98fdc734a0abca136ab712c94246fe66c0.tar.bz2
Add content_exec and associated vtable entry
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/content.h')
-rw-r--r--content/content.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/content/content.h b/content/content.h
index e555df269..77cc60574 100644
--- a/content/content.h
+++ b/content/content.h
@@ -387,6 +387,17 @@ bool content_get_quirks(struct hlcache_handle *h);
bool content_is_locked(struct hlcache_handle *h);
+/**
+ * Execute some JavaScript code inside a content object.
+ *
+ * Runs the passed in JavaScript code in the content object's context.
+ *
+ * \param h The handle to the content
+ * \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 content_exec(struct hlcache_handle *h, const char *src, size_t srclen);
#endif