diff options
Diffstat (limited to 'content/content.h')
-rw-r--r-- | content/content.h | 11 |
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 |