@utls/undom-ef v0.5.0
undom
Minimally viable DOM Document implementation for ef.js
NOTE THIS IS A FORK SPECIALLY FOR ef.js WITH SOME MINOR CHANGES THAT MIGHT NOT FIT THE GOAL OF THE ORIGINAL PROJECT.
A bare-bones HTML DOM in a box. If you want the DOM but not a parser, this might be for you.
Works in Node and browsers, plugin ready!
Project Goals
Undom aims to find a sweet spot between size/performance and utility. The goal is to provide the simplest possible implementation of a DOM Document, such that libraries relying on the DOM can run in places where there isn't one available.
The intent to keep things as simple as possible means undom lacks some DOM features like HTML parsing & serialization, Web Components, etc. These features can be added through additional libraries.
Installation
Via npm:
npm install @utls/undom-ef
Derivatives
DOMiNATIVE Generic DOM implementation for NativeScript
Usage
import {geDOMImpl} from '@utls/undom-ef'
const {document} = getDOMImpl()
let foo = document.createElement('foo')
foo.appendChild(document.createTextNode('Hello, World!'))
document.body.appendChild(foo);
with ef.js
import {getDOMImpl} from '@utls/undom-ef'
import {setDOMImpl} from 'ef.js'
import Tpl from 'tpl.eft'
const domImpl = getDOMImpl()
setDOMImpl(domImpl)
const tpl = new Tpl()
tpl.$mount({target: domImpl.document.body})
Serialize to HTML
import {serialize} from '@utls/undom-ef'
console.log(serialize(element))
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago