View on GitHub

Dom4

a fully tested and covered polyfill for new DOM Level 4 entries

Download this project as a .zip file Download this project as a tar.gz file

DOM4

build status

Via cdnJS

Many thanks to cdnjs for hosting this script. Following an example on how to include it.

<script
  src="//cdnjs.cloudflare.com/ajax/libs/dom4/1.8.3/dom4.js"
>/* DOM4 */</script>

Features

This is a fully tested and covered polyfill for both new DOM Level 4 parentNode entries:

And for new DOM Level 4 childNode entries:

The implemented test is conform to current specifications.

Other fixes/standardized behaviors include:

The DOM4 license is Mit Style.

If you need other polyfills too have a look at another DOM-shim repo.

Compatibility

Theoretically compatible with all browsers you know that are truly used these days, here a list:

It's way easier if you tell me which browser in a current relevant market share is not supported :-)

For IE8 only it's recommended to include ie8 script before dom4 or CustomEvent, addEventListener, and dispatchEvent won't work as expected.

Which File

The minified version is here, while the max one here. If you want to test directly try this page, it should be green.