|
há 1 ano atrás | |
---|---|---|
.. | ||
event | há 1 ano atrás | |
test | há 1 ano atrás | |
.jshintrc | há 1 ano atrás | |
.npmignore | há 1 ano atrás | |
.testem.json | há 1 ano atrás | |
.travis.yml | há 1 ano atrás | |
CONTRIBUTION.md | há 1 ano atrás | |
LICENCE | há 1 ano atrás | |
README.md | há 1 ano atrás | |
docs.mli | há 1 ano atrás | |
document.js | há 1 ano atrás | |
dom-comment.js | há 1 ano atrás | |
dom-element.js | há 1 ano atrás | |
dom-fragment.js | há 1 ano atrás | |
dom-text.js | há 1 ano atrás | |
event.js | há 1 ano atrás | |
index.js | há 1 ano atrás | |
package.json | há 1 ano atrás | |
serialize.js | há 1 ano atrás |
A minimal DOM implementation
var document = require("min-document")
var div = document.createElement("div")
div.className = "foo bar"
var span = document.createElement("span")
div.appendChild(span)
span.textContent = "Hello!"
/* <div class="foo bar">
<span>Hello!</span>
</div>
*/
var html = String(div)
npm install min-document