custom-dom-exception Allows you to throw DOMException-like errors. Usefull when implementing a polyfill (like this). Idea based on this fiddle by Marcos Cáceres'