Skip to content

Commit a0911b4

Browse files
committed
wip
1 parent e656076 commit a0911b4

File tree

1 file changed

+5
-0
lines changed
  • src/Components/Web.JS/src/Rendering/DomMerging

1 file changed

+5
-0
lines changed

src/Components/Web.JS/src/Rendering/DomMerging/DomSync.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@ function domNodeComparer(a: Node, b: Node): UpdateCost {
308308
return UpdateCost.Infinite;
309309
}
310310

311+
// Always treat "preloads" as new elements.
312+
if ((b as Element).tagName === 'LINK' && (b as Element).attributes.getNamedItem('rel')?.value === 'preload') {
313+
return UpdateCost.Infinite;
314+
}
315+
311316
return UpdateCost.None;
312317
case Node.DOCUMENT_TYPE_NODE:
313318
// It's invalid to insert or delete doctype, and we have no use case for doing that. So just skip such

0 commit comments

Comments
 (0)