https://github.com/oozcitak/dom
A modern DOM implementation
https://github.com/oozcitak/dom
dom javascript node-js nodejs
Last synced: 6 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 (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:18:56.000Z (almost 3 years ago)
- Last Synced: 2024-10-29T20:21:49.571Z (12 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/).[](http://opensource.org/licenses/MIT)
[](https://www.npmjs.com/package/@oozcitak/dom)[](http://travis-ci.org/oozcitak/dom)
[](https://ci.appveyor.com/project/oozcitak/dom)
[](https://david-dm.org/oozcitak/dom)
[](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.