Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oozcitak/dom
A modern DOM implementation
https://github.com/oozcitak/dom
dom javascript node-js nodejs
Last synced: 3 months ago
JSON representation
A modern DOM implementation
- Host: GitHub
- URL: https://github.com/oozcitak/dom
- Owner: oozcitak
- License: mit
- Created: 2019-08-01T12:42:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:18:56.000Z (about 2 years ago)
- Last Synced: 2024-10-29T20:21:49.571Z (3 months ago)
- Topics: dom, javascript, node-js, nodejs
- Language: TypeScript
- Homepage:
- Size: 1.46 MB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DOM
A Javascript implementation of the [DOM Living Standard](https://dom.spec.whatwg.org/).[![License](http://img.shields.io/npm/l/@oozcitak/dom.svg?style=flat-square)](http://opensource.org/licenses/MIT)
[![NPM Version](https://img.shields.io/npm/v/@oozcitak/dom?logo=npm&style=flat-square)](https://www.npmjs.com/package/@oozcitak/dom)[![Travis Build Status](https://img.shields.io/travis/oozcitak/dom?logo=travis&style=flat-square)](http://travis-ci.org/oozcitak/dom)
[![AppVeyor Build status](https://img.shields.io/appveyor/ci/oozcitak/dom?logo=appveyor&style=flat-square)](https://ci.appveyor.com/project/oozcitak/dom)
[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/dom.svg?style=flat-square)](https://david-dm.org/oozcitak/dom)
[![Code Coverage](https://img.shields.io/codecov/c/github/oozcitak/dom?logo=codecov&style=flat-square)](https://codecov.io/gh/oozcitak/dom)# Version
Current version implements the standard as of commit [57512fa](https://dom.spec.whatwg.org/commit-snapshots/57512fac17cf2f1c4c85be4aec178c8086ee5ee4/) (Last Updated 24 September 2019).This DOM implementation is for _XML documents only_.
# Installation
```
npm install @oozcitak/dom
```# Usage
Create an instance of the [`DOMImplementation`](https://dom.spec.whatwg.org/#interface-domimplementation) class to construct the DOM tree.```js
const { DOMImplementation } = require("@oozcitak/dom");const dom = new DOMImplementation();
const doc = dom.createDocument('ns', 'root');
```The module also exports [`DOMParser`](https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparser) and [`XMLSerializer`](https://w3c.github.io/DOM-Parsing/#the-xmlserializer-interface) classes as in the browser.