@@ -5,7 +5,7 @@ import { AutoComponentDescriptor, ComponentDescriptor, ServerComponentDescriptor
55import { isInteractiveRootComponentElement } from '../BrowserRenderer' ;
66import { applyAnyDeferredValue } from '../DomSpecialPropertyUtil' ;
77import { LogicalElement , getLogicalChildrenArray , getLogicalNextSibling , getLogicalParent , getLogicalRootDescriptor , insertLogicalChild , insertLogicalChildBefore , isLogicalElement , toLogicalElement , toLogicalRootCommentElement } from '../LogicalElements' ;
8- import { attributeSetsAreIdentical , synchronizeAttributes } from './AttributeSync' ;
8+ import { synchronizeAttributes } from './AttributeSync' ;
99import { cannotMergeDueToDataPermanentAttributes , isDataPermanentElement } from './DataPermanentElementSync' ;
1010import { UpdateCost , ItemList , Operation , computeEditScript } from './EditScript' ;
1111
@@ -308,18 +308,6 @@ function domNodeComparer(a: Node, b: Node): UpdateCost {
308308 return UpdateCost . Infinite ;
309309 }
310310
311- // If both elements are the same preload (based on all attributes), we need to match them and do nothing;
312- // Otherwise, browser would trigger a new preload request.
313- // If attributes don't match, we can't simply update the element, because browser could trigger
314- // an invalid preload request based on attribute order.
315- const aIsPreload = isPreloadElement ( a as Element ) ;
316- const bIsPreload = isPreloadElement ( b as Element ) ;
317- if ( aIsPreload && bIsPreload && attributeSetsAreIdentical ( ( a as Element ) . attributes , ( b as Element ) . attributes ) ) {
318- return UpdateCost . None ;
319- } else if ( aIsPreload || bIsPreload ) {
320- return UpdateCost . Infinite ;
321- }
322-
323311 return UpdateCost . None ;
324312 case Node . DOCUMENT_TYPE_NODE :
325313 // It's invalid to insert or delete doctype, and we have no use case for doing that. So just skip such
@@ -331,10 +319,6 @@ function domNodeComparer(a: Node, b: Node): UpdateCost {
331319 }
332320}
333321
334- function isPreloadElement ( el : Element ) : boolean {
335- return el . tagName === 'LINK' && el . attributes . getNamedItem ( 'rel' ) ?. value === 'preload' ;
336- }
337-
338322function upgradeComponentCommentsToLogicalRootComments ( root : Node ) : ComponentDescriptor [ ] {
339323 const serverDescriptors = discoverComponents ( root , 'server' ) as ServerComponentDescriptor [ ] ;
340324 const webAssemblyDescriptors = discoverComponents ( root , 'webassembly' ) as WebAssemblyComponentDescriptor [ ] ;
0 commit comments