summaryrefslogtreecommitdiff
path: root/javascript/jsapi/htmldocument.bnd
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2012-11-08 17:22:29 +0000
committerVincent Sanders <vince@netsurf-browser.org>2012-11-08 17:22:29 +0000
commit28ac5fe9c1991c57d0a72d22377340b01ab6564b (patch)
tree7d395d9913739cb775a55f70dd69a3a04e578e51 /javascript/jsapi/htmldocument.bnd
parent9006a96119854e6975a66025bfaf9bf63767fec7 (diff)
downloadnetsurf-28ac5fe9c1991c57d0a72d22377340b01ab6564b.tar.gz
netsurf-28ac5fe9c1991c57d0a72d22377340b01ab6564b.tar.bz2
implement appendChild so wikipedia lcm script works
Diffstat (limited to 'javascript/jsapi/htmldocument.bnd')
-rw-r--r--javascript/jsapi/htmldocument.bnd10
1 files changed, 9 insertions, 1 deletions
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);
%}