templates: compress inter-tag whitespace
to reduce number of DOM nodes by 25%
This commit is contained in:
parent
fcb149ae21
commit
a889ac6413
|
@ -100,7 +100,7 @@
|
|||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.svg-icon:not(.applies-to-help):not(.dismiss) {
|
||||
.svg-icon:not(.dismiss) {
|
||||
margin-left: 0.2rem;
|
||||
}
|
||||
h2 .svg-icon, label .svg-icon {
|
||||
|
|
|
@ -41,8 +41,8 @@ function tNodeList(nodes) {
|
|||
continue;
|
||||
}
|
||||
if (node.localName == 'template') {
|
||||
tNodeList(node.content.querySelectorAll('*'));
|
||||
template[node.dataset.id] = node.content.firstElementChild;
|
||||
// compress inter-tag whitespace to reduce number of DOM nodes by 25%
|
||||
template[node.dataset.id] = tHTML(node.innerHTML);
|
||||
continue;
|
||||
}
|
||||
for (const attr of [...node.attributes]) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user