1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-01 20:32:13 +02:00

🐛 update dom.js to set/remove attributes ("xlink:href")

This commit is contained in:
2023-09-21 14:58:27 +02:00
parent 19051c256a
commit d20e2041f6
5 changed files with 27 additions and 5 deletions

View File

@ -56,7 +56,9 @@ export function assign(element, ...attributes){
}
if("className"===key) key= "class";
switch(key){
case "href": case "src": case "class": case "xlink:href":
case "href": case "src": case "class":
return setRemoveAttr(key, attr);
case "xlink:href":
return setRemoveAttr(key, attr, "http://www.w3.org/1999/xlink");
case "textContent": case "innerText":
if(!is_svg) return setDeleteAttr(element, key, attr);