TINYDOM 3 COMING SOON!
TinyDOM is a very basic DOM manipulation library.
###appendHead
Appends HTML to the head.
####Example
$.appendHead('<script>alert("XSS!")</script>');###appendBody
Appends HTML to the body.
$.appendBody('<h1>This will be appended!</h1>');###prependHead
Prepends HTML to the head.
####Example
$.prependHead('<script>alert("XSS!")</script>');###prependBody
Prepends HTML to the body.
$.prependBody('<h1>This will be prepended!</h1>');###replaceHead
Replaces the head with the HTML given.
$.replaceHead("<style>body{background:black}</style>")###replaceBody
Replaces the body with the HTML given.
$.replaceBody("<h1>XSS</h1>")###clearHead
Clears all elements in the head.
$.clearHead()###clearBody
Clears all elements in the body.
$.clearBody()###loadJS
Lazy loads a Javascript file.
$.loadJS('https://raw.github.com/ctult/TinyDOM/master/tinyDOM.min.js')###loadCSS
Lazy loads a CSS file.
$.loadCSS("style.css")###id
Shortcut for document.getElementById.
$.id('foo') //equals document.getElementById###tag
Shortcut for document.getElementsByTagName.
$.tag('div') //equals document.getElementsByTagName('div')###head
Shortcut for document.head.
$.head.innerHTML = "<script>alert('XSS!')</script>"s###body
Shortcut for document.body.
$.body.innerHTML = "Hi!"###HS
HTML Sugar. BuildSugar Renamed.
$.HS('H1 id="hi"', 'Hi');##Naming
TinyDOM will use $ ONLY if $ is not taken.
It will always use tinyDOM, even if it has to overwrite the original.