DEV: Remove xlink hrefs (#15059)

This commit is contained in:
Natalie Tay
2021-11-25 12:22:43 +08:00
committed by GitHub
parent 09260148b1
commit 4c46c7e334
20 changed files with 44 additions and 50 deletions

View File

@ -149,7 +149,7 @@ registerIconRenderer({
if (params.label) {
html += " aria-hidden='true'";
}
html += ` xmlns="${SVG_NAMESPACE}"><use xlink:href="#${id}" /></svg>`;
html += ` xmlns="${SVG_NAMESPACE}"><use href="#${id}" /></svg>`;
if (params.label) {
html += `<span class='sr-only'>${escape(params.label)}</span>`;
}
@ -178,10 +178,7 @@ registerIconRenderer({
},
[
h("use", {
"xlink:href": attributeHook(
"http://www.w3.org/1999/xlink",
`#${escape(id)}`
),
href: attributeHook("http://www.w3.org/1999/xlink", `#${escape(id)}`),
namespace: SVG_NAMESPACE,
}),
]