mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 04:56:50 +03:00
implement Element::removeAttribute
This commit is contained in:
parent
7ab835df8f
commit
09dc0649df
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user