0.5.0 • Published 2 years ago

@utls/undom-ef v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

undom

NPM

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))
0.3.9

2 years ago

0.3.10

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.3.6

2 years ago

0.2.7

2 years ago

0.3.5

2 years ago

0.2.6

2 years ago

0.3.8

2 years ago

0.2.9

2 years ago

0.3.7

2 years ago

0.2.8

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.3.2

2 years ago

0.2.3

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.2.2

2 years ago

0.4.3

2 years ago

0.3.4

2 years ago

0.2.5

2 years ago

0.4.2

2 years ago

0.3.3

2 years ago

0.2.4

2 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago