Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

domexception

Package Overview
Dependencies
1
Maintainers
6
Versions
6
Issues
File Explorer

Advanced tools

domexception

An implementation of the DOMException class from browsers

    4.0.0latest

Version published
Maintainers
6
Weekly downloads
16,389,825
decreased by-12.71%

Weekly downloads

Changelog

Source

4.0.0

The breaking changes in this version are to the API exported by the domexception/webidl2js-wrapper module. In particular it now is based on webidl2js v17, which changes some of the exported function signatures, and changes the realms of any errors thrown on misuse.

Readme

Source

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.

Keywords

FAQs

What is domexception?

An implementation of the DOMException class from browsers

Is domexception popular?

The npm package domexception receives a total of 13,080,009 weekly downloads. As such, domexception popularity was classified as popular.

Is domexception well maintained?

We found that domexception demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 6 open source maintainers collaborating on the project.

Last updated on 06 Oct 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc