Javascript phase 2 finished.

This commit is contained in:
Storm Dragon
2025-08-17 09:34:38 -04:00
parent 6cf0975fe1
commit 5738cf9132
6 changed files with 842 additions and 20 deletions

View File

@@ -108,6 +108,10 @@ void w3m_dom_build_from_buffer(W3MDocument *doc, Buffer *buf);
void w3m_dom_update_buffer(W3MDocument *doc);
W3MElement *w3m_dom_find_element_at_position(W3MDocument *doc, int line_num, int col);
/* Internal DOM Management */
void add_element_to_document(W3MDocument *doc, W3MElement *elem);
void set_element_buffer_position(W3MElement *elem, Buffer *buf);
/* JavaScript Binding */
void w3m_dom_bind_to_js(W3MJSContext *ctx, W3MDocument *doc);
JSValue w3m_dom_element_to_js(W3MJSContext *ctx, W3MElement *elem);
@@ -121,6 +125,7 @@ JSValue js_element_getAttribute(JSContext *ctx, JSValueConst this_val, int argc,
JSValue js_element_setAttribute(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv);
JSValue js_element_get_textContent(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv);
JSValue js_element_set_textContent(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv);
JSValue js_document_write(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv);
#endif /* USE_JAVASCRIPT */