JavaScript polyfill for the DOM Parsing and Serialization spec. Used for testing the algorithms in the spec.