mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-21 23:39:37 +01:00
🐛 update dom.js to set/remove attributes ("xlink:href")
This commit is contained in:
parent
19051c256a
commit
d20e2041f6
7
dist/dde-with-signals.js
vendored
7
dist/dde-with-signals.js
vendored
@ -94,7 +94,12 @@
|
||||
case "src":
|
||||
case "class":
|
||||
case "xlink:href":
|
||||
return i(f, a, "http://www.w3.org/1999/xlink");
|
||||
return i(
|
||||
f,
|
||||
a,
|
||||
/* this applies only to SVG elements, see setRemove/setRemoveNS */
|
||||
"http://www.w3.org/1999/xlink"
|
||||
);
|
||||
case "textContent":
|
||||
case "innerText":
|
||||
return o ? e.appendChild(document.createTextNode(a)) : j(e, f, a);
|
||||
|
7
dist/dde.js
vendored
7
dist/dde.js
vendored
@ -90,7 +90,12 @@
|
||||
case "src":
|
||||
case "class":
|
||||
case "xlink:href":
|
||||
return d(f, u, "http://www.w3.org/1999/xlink");
|
||||
return d(
|
||||
f,
|
||||
u,
|
||||
/* this applies only to SVG elements, see setRemove/setRemoveNS */
|
||||
"http://www.w3.org/1999/xlink"
|
||||
);
|
||||
case "textContent":
|
||||
case "innerText":
|
||||
return c ? e.appendChild(document.createTextNode(u)) : R(e, f, u);
|
||||
|
7
dist/esm-with-signals.js
vendored
7
dist/esm-with-signals.js
vendored
@ -92,7 +92,12 @@ function w(e, ...t) {
|
||||
case "src":
|
||||
case "class":
|
||||
case "xlink:href":
|
||||
return i(f, a, "http://www.w3.org/1999/xlink");
|
||||
return i(
|
||||
f,
|
||||
a,
|
||||
/* this applies only to SVG elements, see setRemove/setRemoveNS */
|
||||
"http://www.w3.org/1999/xlink"
|
||||
);
|
||||
case "textContent":
|
||||
case "innerText":
|
||||
return o ? e.appendChild(document.createTextNode(a)) : j(e, f, a);
|
||||
|
7
dist/esm.js
vendored
7
dist/esm.js
vendored
@ -88,7 +88,12 @@ function x(e, ...t) {
|
||||
case "src":
|
||||
case "class":
|
||||
case "xlink:href":
|
||||
return d(f, u, "http://www.w3.org/1999/xlink");
|
||||
return d(
|
||||
f,
|
||||
u,
|
||||
/* this applies only to SVG elements, see setRemove/setRemoveNS */
|
||||
"http://www.w3.org/1999/xlink"
|
||||
);
|
||||
case "textContent":
|
||||
case "innerText":
|
||||
return c ? e.appendChild(document.createTextNode(u)) : R(e, f, u);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user