[IMP] app: mount app in "first-child" position

We reintroduce the possibility to mount the app in first position in
a target. The option "self" has been dropped since it is now possible
for a component to have several top level nodes.
This commit is contained in:
Mathieu Duckerts-Antoine
2021-10-22 17:30:20 +02:00
committed by Aaron Bohy
parent aa3148eddf
commit ebd2e4324f
7 changed files with 92 additions and 76 deletions
+2 -2
View File
@@ -23,8 +23,8 @@ export interface VNode<T = any> {
export type BDom = VNode<any>;
export function mount(vnode: VNode, fixture: HTMLElement) {
vnode.mount(fixture, null);
export function mount(vnode: VNode, fixture: HTMLElement, afterNode: Node | null = null) {
vnode.mount(fixture, afterNode);
}
export function patch(vnode1: VNode, vnode2: VNode, withBeforeRemove: boolean = false) {