Skip to content
forked from litejs/dom

A small DOM implementation where most of DOM attributes and methods from document are implemented

Notifications You must be signed in to change notification settings

scenevr/dom-lite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@version    0.5.0
@date       2015-07-24
@stability  2 - Unstable

DOM lite – Build Coverage

A small DOM implementation where most of DOM attributes and methods from document are implemented.

Examples

var document = require("dom-lite").document;

var el = document.createElement("h1");
el.id = 123;
el.className = "large";

var fragment = document.createDocumentFragment();
var text1 = document.createTextNode("hello");
var text2 = document.createTextNode(" world");

fragment.appendChild(text1);
fragment.appendChild(text2);
el.appendChild(fragment);

el.innerHTML;
// hello world
el.innerHTML = "<b>hello world</b>"
el.outerHTML;
// <h1 id="123" class="large"><b>hello world</b></h1>
el.querySelectorAll("b");
// [ "<b>hello world</b>" ]

Coding Style Guidelines

  • Use tabs for indentation, align with spaces
  • Use lowerCamelCase for method and variable names
  • Use UpperCamelCase for constructor names
  • Commit files with Unix-style line endings
  • Do not use spaces in file and directory names Consider substituting a dash (-) where you would normally use spaces.
  • Rebase before pushing
  • Fix tests before push or pull request

External links

Licence

Copyright (c) 2014-2015 Lauri Rooden <[email protected]>
The MIT License

About

A small DOM implementation where most of DOM attributes and methods from document are implemented

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.4%
  • HTML 2.6%