23#ifndef NETSURF_JAVASCRIPT_JS_H_
24#define NETSURF_JAVASCRIPT_JS_H_
129bool js_exec(
jsthread *thread,
const uint8_t *txt,
size_t txtlen,
const char *name);
138 struct dom_document *document,
139 struct dom_node *node,
140 struct dom_string *event_type_dom,
nserror
Enumeration of error codes.
void js_destroythread(jsthread *thread)
Destroy a javascript thread.
void js_destroyheap(jsheap *heap)
Destroy a previously created heap.
void js_handle_new_element(jsthread *thread, struct dom_element *node)
Handle a new element being created.
void js_event_cleanup(jsthread *thread, struct dom_event *evt)
Handle an event propagation finished callback.
void js_finalise(void)
finalise javascript interpreter
nserror js_newheap(int timeout, jsheap **heap)
Create a new javascript heap.
nserror js_newthread(jsheap *heap, void *win_priv, void *doc_priv, jsthread **thread)
Create a new javascript thread.
void js_initialise(void)
Initialise javascript interpreter.
bool js_fire_event(jsthread *thread, const char *type, struct dom_document *doc, struct dom_node *target)
fire an event at a dom node
bool js_dom_event_add_listener(jsthread *thread, struct dom_document *document, struct dom_node *node, struct dom_string *event_type_dom, void *js_funcval)
bool js_exec(jsthread *thread, const uint8_t *txt, size_t txtlen, const char *name)
execute some javascript in a context
nserror js_closethread(jsthread *thread)
Close a javascript thread.
jsheap * heap
The heap this thread belongs to.