summaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'javascript')
-rw-r--r--javascript/duktape/Element.bnd17
1 files changed, 17 insertions, 0 deletions
diff --git a/javascript/duktape/Element.bnd b/javascript/duktape/Element.bnd
index 04b7b09bc..231c7affb 100644
--- a/javascript/duktape/Element.bnd
+++ b/javascript/duktape/Element.bnd
@@ -248,6 +248,23 @@ setter Element::id ()
return 0;
%}
+
+method Element::removeAttribute()
+%{
+ dom_string *attr = NULL;
+ dom_exception exc;
+ duk_size_t slen;
+ const char *s = duk_safe_to_lstring(ctx, 0, &slen);
+
+ exc = dom_string_create((const uint8_t *)s, slen, &attr);
+ if (exc != DOM_NO_ERR) return 0;
+
+ exc = dom_element_remove_attribute(priv->parent.node, attr);
+ dom_string_unref(attr);
+ if (exc != DOM_NO_ERR) return 0;
+ return 0;
+%}
+
method Element::setAttribute()
%{
dom_exception exc;