UNPKG

happy-dom

Version:

Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.

22 lines (19 loc) 450 B
import DOMExceptionNameEnum from './DOMExceptionNameEnum.js'; /** * DOM Exception. * * Reference: * https://developer.mozilla.org/en-US/docs/Web/API/DOMException/DOMException. */ export default class DOMException extends Error { /** * Constructor. * * @param message Message. * @param name Name. */ constructor(message: string, name: string = null) { super(message); this.name = name || DOMExceptionNameEnum.domException; } }