setAttributeNodeNS

external fun setAttributeNodeNS(attr: Attr): Attr?(source)

The setAttributeNodeNS() method of the Element interface adds a new namespaced Attr node to an element.

MDN Reference