diff options
author | Vincent Sanders <vince@kyllikki.org> | 2013-01-23 17:11:40 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2013-01-23 17:12:57 +0000 |
commit | 09dc0649df1b0dd97e4c13aef3c41870eeff5572 (patch) | |
tree | 031a402302f5ae243b449036ad5eedaabca73e7d /javascript | |
parent | 7ab835df8f45fcea7f12eafe422021b8232b5dd8 (diff) | |
download | netsurf-09dc0649df1b0dd97e4c13aef3c41870eeff5572.tar.gz netsurf-09dc0649df1b0dd97e4c13aef3c41870eeff5572.tar.bz2 |
implement Element::removeAttribute
Diffstat (limited to 'javascript')
-rw-r--r-- | javascript/jsapi/htmlelement.bnd | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/javascript/jsapi/htmlelement.bnd b/javascript/jsapi/htmlelement.bnd index 9af6f2bb5..c0a7f0410 100644 --- a/javascript/jsapi/htmlelement.bnd +++ b/javascript/jsapi/htmlelement.bnd @@ -227,6 +227,23 @@ operation setAttribute %{ } %} +/* void Element::removeAttribute(DOMString name); */ +operation removeAttribute %{ + dom_string *name_dom; + dom_exception exc; + + exc = dom_string_create((unsigned char*)name, name_len, &name_dom); + if (exc != DOM_NO_ERR) { + return JS_FALSE; + } + + exc = dom_element_remove_attribute(private->node, name_dom); + dom_string_unref(name_dom); + if (exc != DOM_NO_ERR) { + return JS_FALSE; + } +%} + /* * * Dom 4 says this should return a htmlcollection, libdom currently |