mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-21 11:42:56 +03:00
Add support for Element::removeAttribute.
This commit is contained in:
parent
218839d05a
commit
0fabb20cc5
@ -480,7 +480,6 @@ method Element::queryAll();\n
|
|||||||
method Element::querySelector();\n
|
method Element::querySelector();\n
|
||||||
method Element::querySelectorAll();\n
|
method Element::querySelectorAll();\n
|
||||||
method Element::remove();\n
|
method Element::remove();\n
|
||||||
method Element::removeAttribute();\n
|
|
||||||
method Element::removeAttributeNode();\n
|
method Element::removeAttributeNode();\n
|
||||||
method Element::removeAttributeNS();\n
|
method Element::removeAttributeNS();\n
|
||||||
method Element::replaceWith();\n
|
method Element::replaceWith();\n
|
||||||
|
@ -248,6 +248,23 @@ setter Element::id ()
|
|||||||
return 0;
|
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()
|
method Element::setAttribute()
|
||||||
%{
|
%{
|
||||||
dom_exception exc;
|
dom_exception exc;
|
||||||
|
Loading…
Reference in New Issue
Block a user