# DOMExceptionThis package implements the [`DOMException`](https://heycam.github.io/webidl/#idl-DOMException) class, from web browsers. It exists in service of [jsdom](https://github.com/tmpvar/jsdom) and related packages.Example usage:```jsconstDOMException=require("domexception");conste1=newDOMException("Something went wrong","BadThingsError");console.assert(e1.name==="BadThingsError");console.assert(e1.code===0);conste2=newDOMException("Another exciting error message","NoModificationAllowedError");console.assert(e2.name==="NoModificationAllowedError");console.assert(e2.code===7);console.assert(DOMException.INUSE_ATTRIBUTE_ERR===10);```