Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hemanth/dom-to-string
Cross browser, DOM to String.
https://github.com/hemanth/dom-to-string
dom
Last synced: 2 months ago
JSON representation
Cross browser, DOM to String.
- Host: GitHub
- URL: https://github.com/hemanth/dom-to-string
- Owner: hemanth
- License: mit
- Created: 2015-02-20T05:21:24.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-13T06:48:14.000Z (over 7 years ago)
- Last Synced: 2024-10-17T10:07:35.558Z (4 months ago)
- Topics: dom
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- Contributing: CONTRIBUTING.markdown
- License: LICENSE
Awesome Lists containing this project
README
# dom-to-string
[![Build Status](https://travis-ci.org/hemanth/dom-to-string.svg)](https://travis-ci.org/hemanth/dom-to-string) [![npm version](https://badge.fury.io/js/dom-to-string.svg)](http://badge.fury.io/js/dom-to-string)
> Cross browser DOM to String converter.## Installation
`npm install dom-to-string --save`
## Usage
```js
const dom2str = require('dom-to-string');var p = document.createElement('p');
p.innerHTML = "hello";dom2str(p); // '
hello
'
```