File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -542,11 +542,9 @@ export class Component<
542542 const comp = Object . create ( proto ) as ComponentInstance < TData , TProperty , TMethod >
543543 if ( ENV . DEV ) performanceMeasureStart ( 'component.create' , comp )
544544 comp . _$genericImpls = genericImpls
545- comp . _$placeholderHandlerRemover = placeholderHandlerRemover
546545 comp . _$external = external
547546 comp . tagName = tagName
548547 comp . _$methodCaller = comp
549- comp . _$virtual = virtualHost
550548
551549 // check shared style scope
552550 const ownerSpace = behavior . ownerSpace
@@ -601,6 +599,7 @@ export class Component<
601599 owner ,
602600 owner ? owner . _$nodeTreeContext : nodeTreeContext ! ,
603601 )
602+ comp . _$placeholderHandlerRemover = placeholderHandlerRemover
604603
605604 const ownerHost = owner ? owner . getHostNode ( ) : undefined
606605 const ownerComponentOptions = ownerHost ?. getComponentOptions ( )
Original file line number Diff line number Diff line change @@ -108,11 +108,9 @@ export class ComponentWaitingList {
108108 }
109109
110110 call ( c : GeneralComponentDefinition ) {
111- const cbs = this . _$callbacks
112- this . _$callbacks = [ ]
113- for ( let i = 0 ; i < cbs . length ; i += 1 ) {
114- const f = cbs [ i ] !
115- f ( c )
111+ while ( this . _$callbacks . length > 0 ) {
112+ const callback = this . _$callbacks . shift ( ) !
113+ callback ( c )
116114 }
117115 }
118116}
Original file line number Diff line number Diff line change @@ -577,8 +577,6 @@ export class Element implements NodeCast {
577577 node . triggerLifetime ( 'beforeDetach' , [ ] )
578578 }
579579 node . childNodes . forEach ( callFunc )
580- const f = node . _$placeholderHandlerRemover
581- if ( typeof f === 'function' ) f ( )
582580 if ( isComponent ( node ) ) {
583581 const shadowRoot = node . getShadowRoot ( )
584582 if ( shadowRoot ) callFunc ( shadowRoot )
@@ -624,6 +622,8 @@ export class Element implements NodeCast {
624622 elem . _$destroyOnRemoval = AutoDestroyState . Destroyed
625623 elem . destroyBackendElement ( )
626624 }
625+ const f = elem . _$placeholderHandlerRemover
626+ if ( typeof f === 'function' ) f ( )
627627 }
628628 rec ( node )
629629 } else if ( node . _$destroyOnRemoval === AutoDestroyState . Enabled ) {
You can’t perform that action at this time.
0 commit comments