1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-11 08:22:14 +02:00

🐛 add missing cases for href, src, class, xlink:href, textContent, innerText

This commit is contained in:
2023-09-21 13:14:55 +02:00
parent 951f589ceb
commit 0794659104
5 changed files with 26 additions and 6 deletions

View File

@ -90,6 +90,7 @@
if (typeof a == "object" && a !== null && !Array.isArray(a))
switch (s) {
case "style":
case "dataset":
return N(r, a, T.bind(null, e[s]));
case "ariaset":
return N(r, a, (E, c) => i("aria-" + E, c));
@ -102,8 +103,12 @@
return s = s.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), i(s, a);
switch (s === "className" && (s = "class"), s) {
case "href":
case "src":
case "class":
case "xlink:href":
return i(s, a, "http://www.w3.org/1999/xlink");
case "textContent":
case "innerText":
return o ? e.appendChild(document.createTextNode(a)) : j(e, s, a);
}
return H(e, s) ? j(e, s, a) : i(s, a);