@@ -5,7 +5,7 @@ import { Text } from "../shared/SpecificBuiltinTags";
55import { createAppAPI } from "./createApp" ;
66
77export function createRenderer ( customRenderOptions ) {
8- const { createElement, patchProp, insert } = customRenderOptions ;
8+ const { createElement : hostCreateElement , patchProp : hostPatchProp , insert : hostInsert } = customRenderOptions ;
99
1010 function render ( vnode , container , parentComponent ) {
1111 patch ( vnode , container , parentComponent ) ;
@@ -46,14 +46,14 @@ export function createRenderer(customRenderOptions) {
4646 setupRenderEffect ( instance , container , initialVNode ) ;
4747 }
4848 function mountElement ( vnode : any , container : any , parentComponent ) {
49- const el = ( vnode . el = createElement ( vnode . type ) )
49+ const el = ( vnode . el = hostCreateElement ( vnode . type ) )
5050 if ( vnode . shapeFlag & ShapeFlags . TEXT_CHILDREN ) {
5151 el . textContent = vnode . children ;
5252 } else if ( vnode . shapeFlag & ShapeFlags . ARRAY_CHILDREN ) {
5353 mountChildren ( vnode . children , el , parentComponent ) ;
5454 }
5555 addAttrs ( vnode , el ) ;
56- insert ( el , container ) ;
56+ hostInsert ( el , container ) ;
5757 }
5858 function mountChildren ( children = [ ] , container , parentComponent ) {
5959 children . forEach ( child => {
@@ -66,7 +66,7 @@ export function createRenderer(customRenderOptions) {
6666 for ( const key in props ) {
6767 if ( Object . prototype . hasOwnProperty . call ( props , key ) ) {
6868 const value = props [ key ] ;
69- patchProp ( container , key , value ) ;
69+ hostPatchProp ( container , key , value ) ;
7070 }
7171 }
7272 }
0 commit comments