domexception
An implementation of the DOMException class from browsers
Last updated 7 months ago by domenic .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install domexception 
SYNC missed versions from official npm registry.

DOMException

This package implements the DOMException class, from web browsers. It exists in service of jsdom and related packages.

Example usage:

const DOMException = require("domexception");

const e1 = new DOMException("Something went wrong", "BadThingsError");
console.assert(e1.name === "BadThingsError");
console.assert(e1.code === 0);

const e2 = new DOMException("Another exciting error message", "NoModificationAllowedError");
console.assert(e2.name === "NoModificationAllowedError");
console.assert(e2.code === 7);

console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10);

APIs

This package exposes two flavors of the DOMException interface depending on the imported module.

domexception module

This module default-exports the DOMException interface constructor.

domexception/webidl2js-wrapper module

This module exports the DOMException interface wrapper API generated by webidl2js.

Current Tags

  • 2.0.1                                ...           latest (7 months ago)

4 Versions

  • 2.0.1                                ...           7 months ago
  • 2.0.0                                ...           7 months ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           3 years ago
Downloads
Today 3,862
This Week 3,862
This Month 141,926
Last Day 5,057
Last Week 88,255
Last Month 321,820
Dependencies (1)
Dev Dependencies (5)
Dependents (105)

Copyright 2014 - 2017 © taobao.org |