feat(viewPort): adds initial implementation of ViewPort.
ViewPort is the mechanism backing @Template directives. Those directives can use the viewport to dynamically create, attach and detach views.
This commit is contained in:
@ -47,6 +47,12 @@ class DOM {
|
||||
static appendChild(el, node) {
|
||||
el.append(node);
|
||||
}
|
||||
static removeChild(el, node) {
|
||||
node.remove();
|
||||
}
|
||||
static insertAfter(el, node) {
|
||||
el.parentNode.insertBefore(node, el.nextNode);
|
||||
}
|
||||
static setText(Text text, String value) {
|
||||
text.text = value;
|
||||
}
|
||||
|
@ -40,6 +40,12 @@ export class DOM {
|
||||
static appendChild(el, node) {
|
||||
el.appendChild(node);
|
||||
}
|
||||
static removeChild(el, node) {
|
||||
el.removeChild(node);
|
||||
}
|
||||
static insertAfter(el, node) {
|
||||
el.parentNode.insertBefore(node, el.nextSibling);
|
||||
}
|
||||
static setInnerHTML(el, value) {
|
||||
el.innerHTML = value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user