set
Set an attribute of this element. For example a().setAttribute("href", "http://kweb.io")
will create an <a>
element and set it to <a href="http://kweb.io/">
.
Set an attribute of this element. For example element["href"] = "http://kweb.io"
will create an <a>
element and set it to <a href="http://kweb.io/">
.
Parameters
namespace
If non-null elements will be created with Element.setAttributeNS() with the specified namespace. If null then Kweb will use Element.createElement.
Set an attribute to the value in a KVal, if the value changes the attribute value will be updated automatically.