vasille
Version:
The same framework which is designed to build bulletproof frontends (core library).
32 lines (31 loc) • 726 B
JavaScript
import { Fragment, Root } from "./node.js";
/**
* Represents a Vasille.js application
* @class App
* @extends Root
*/
export class App extends Root {
node;
/**
* Constructs an app node
* @param node {Element} The root of application
* @param runner {Runner} A adapter which execute DOM manipulation
*/
constructor(node, runner) {
super(runner);
this.node = node;
}
appendNode(node) {
this.runner.appendChild(this.node, node);
}
}
export class Portal extends Fragment {
node;
constructor(input, runner) {
super(runner);
this.node = input.node;
}
appendNode(node) {
this.runner.appendChild(this.node, node);
}
}