summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/data/bindings/browser-duk.bnd17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/data/bindings/browser-duk.bnd b/test/data/bindings/browser-duk.bnd
index 0ddfa02..513ad99 100644
--- a/test/data/bindings/browser-duk.bnd
+++ b/test/data/bindings/browser-duk.bnd
@@ -161,10 +161,23 @@ method Node::appendChild()
dom_node_unref(spare);
%}
-getter Node::aprop()
+getter Node::textContent()
%{
+ dom_exception exc;
+ dom_string *content;
+
+ exc = dom_node_get_text_content(priv->node, &content);
+ if (exc != DOM_NO_ERR) {
+ return 0;
+ }
+
+ if (content != NULL) {
+ duk_push_lstring(ctx, dom_string_data(content), dom_string_length(content));
+ dom_string_unref(content);
+ return 1;
+ }
%}
-setter Node::aprop()
+setter Node::textContent()
%{
%}