@@ -107,10 +107,7 @@ export interface RendererOptions<
107
107
prevValue : any ,
108
108
nextValue : any ,
109
109
namespace ?: ElementNamespace ,
110
- prevChildren ?: VNode < HostNode , HostElement > [ ] ,
111
110
parentComponent ?: ComponentInternalInstance | null ,
112
- parentSuspense ?: SuspenseBoundary | null ,
113
- unmountChildren ?: UnmountChildrenFn ,
114
111
) : void
115
112
insert ( el : HostNode , parent : HostElement , anchor ?: HostNode | null ) : void
116
113
remove ( el : HostNode ) : void
@@ -670,17 +667,7 @@ function baseCreateRenderer(
670
667
if ( props ) {
671
668
for ( const key in props ) {
672
669
if ( key !== 'value' && ! isReservedProp ( key ) ) {
673
- hostPatchProp (
674
- el ,
675
- key ,
676
- null ,
677
- props [ key ] ,
678
- namespace ,
679
- vnode . children as VNode [ ] ,
680
- parentComponent ,
681
- parentSuspense ,
682
- unmountChildren ,
683
- )
670
+ hostPatchProp ( el , key , null , props [ key ] , namespace , parentComponent )
684
671
}
685
672
}
686
673
/**
@@ -833,6 +820,15 @@ function baseCreateRenderer(
833
820
dynamicChildren = null
834
821
}
835
822
823
+ // #9135 innerHTML / textContent unset needs to happen before possible
824
+ // new children mount
825
+ if (
826
+ ( oldProps . innerHTML && newProps . innerHTML == null ) ||
827
+ ( oldProps . textContent && newProps . textContent == null )
828
+ ) {
829
+ hostSetElementText ( el , '' )
830
+ }
831
+
836
832
if ( dynamicChildren ) {
837
833
patchBlockChildren (
838
834
n1 . dynamicChildren ! ,
@@ -869,15 +865,7 @@ function baseCreateRenderer(
869
865
// (i.e. at the exact same position in the source template)
870
866
if ( patchFlag & PatchFlags . FULL_PROPS ) {
871
867
// element props contain dynamic keys, full diff needed
872
- patchProps (
873
- el ,
874
- n2 ,
875
- oldProps ,
876
- newProps ,
877
- parentComponent ,
878
- parentSuspense ,
879
- namespace ,
880
- )
868
+ patchProps ( el , oldProps , newProps , parentComponent , namespace )
881
869
} else {
882
870
// class
883
871
// this flag is matched when the element has dynamic class bindings.
@@ -908,17 +896,7 @@ function baseCreateRenderer(
908
896
const next = newProps [ key ]
909
897
// #1471 force patch value
910
898
if ( next !== prev || key === 'value' ) {
911
- hostPatchProp (
912
- el ,
913
- key ,
914
- prev ,
915
- next ,
916
- namespace ,
917
- n1 . children as VNode [ ] ,
918
- parentComponent ,
919
- parentSuspense ,
920
- unmountChildren ,
921
- )
899
+ hostPatchProp ( el , key , prev , next , namespace , parentComponent )
922
900
}
923
901
}
924
902
}
@@ -933,15 +911,7 @@ function baseCreateRenderer(
933
911
}
934
912
} else if ( ! optimized && dynamicChildren == null ) {
935
913
// unoptimized, full diff
936
- patchProps (
937
- el ,
938
- n2 ,
939
- oldProps ,
940
- newProps ,
941
- parentComponent ,
942
- parentSuspense ,
943
- namespace ,
944
- )
914
+ patchProps ( el , oldProps , newProps , parentComponent , namespace )
945
915
}
946
916
947
917
if ( ( vnodeHook = newProps . onVnodeUpdated ) || dirs ) {
@@ -998,11 +968,9 @@ function baseCreateRenderer(
998
968
999
969
const patchProps = (
1000
970
el : RendererElement ,
1001
- vnode : VNode ,
1002
971
oldProps : Data ,
1003
972
newProps : Data ,
1004
973
parentComponent : ComponentInternalInstance | null ,
1005
- parentSuspense : SuspenseBoundary | null ,
1006
974
namespace : ElementNamespace ,
1007
975
) => {
1008
976
if ( oldProps !== newProps ) {
@@ -1015,10 +983,7 @@ function baseCreateRenderer(
1015
983
oldProps [ key ] ,
1016
984
null ,
1017
985
namespace ,
1018
- vnode . children as VNode [ ] ,
1019
986
parentComponent ,
1020
- parentSuspense ,
1021
- unmountChildren ,
1022
987
)
1023
988
}
1024
989
}
@@ -1030,17 +995,7 @@ function baseCreateRenderer(
1030
995
const prev = oldProps [ key ]
1031
996
// defer patching value
1032
997
if ( next !== prev && key !== 'value' ) {
1033
- hostPatchProp (
1034
- el ,
1035
- key ,
1036
- prev ,
1037
- next ,
1038
- namespace ,
1039
- vnode . children as VNode [ ] ,
1040
- parentComponent ,
1041
- parentSuspense ,
1042
- unmountChildren ,
1043
- )
998
+ hostPatchProp ( el , key , prev , next , namespace , parentComponent )
1044
999
}
1045
1000
}
1046
1001
if ( 'value' in newProps ) {
0 commit comments