From 28ac5fe9c1991c57d0a72d22377340b01ab6564b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 8 Nov 2012 17:22:29 +0000 Subject: implement appendChild so wikipedia lcm script works --- javascript/jsapi/htmldocument.bnd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'javascript/jsapi/htmldocument.bnd') diff --git a/javascript/jsapi/htmldocument.bnd b/javascript/jsapi/htmldocument.bnd index 272bbd2a9..6205ce01d 100644 --- a/javascript/jsapi/htmldocument.bnd +++ b/javascript/jsapi/htmldocument.bnd @@ -91,6 +91,8 @@ getter body %{ dom_node *body; dom_exception exc; + JSLOG("Getting your body"); + /* document (html) element */ exc = dom_document_get_document_element(private->node, &element); if (exc != DOM_NO_ERR) { @@ -104,6 +106,9 @@ getter body %{ } dom_node_unref(element); } + + JSLOG("returning jsobject %p",jsret); + %} operation getElementById %{ @@ -176,6 +181,7 @@ operation createTextNode %{ dom_exception exc; dom_text *text; + JSLOG("Creating text node for string \"%s\"", data); exc = dom_string_create((unsigned char*)data, data_len, &data_dom); if (exc != DOM_NO_ERR) { return JS_FALSE; @@ -187,6 +193,8 @@ operation createTextNode %{ return JS_FALSE; } - jsret = jsapi_new_Text(cx, NULL, NULL, text); + jsret = jsapi_new_Text(cx, NULL, NULL, text, private->htmlc); + + JSLOG("returning jsobject %p",jsret); %} -- cgit v1.2.3