Skip to content

Instantly share code, notes, and snippets.

/**
* Polyfill for missing window.DOMParser on CocoonJS. Once you have this file in your dependency list,
* all you need to do is CocoonJS check in your main application file, eg:
*
* in app.js/index.js/main.js
*
* var GameSpace = {};
* window.onload = function() {
* if (navigator.isCocoonJS) {
* window.DOMParser = GameSpace.DOMishParser;