source: node_modules/node-domexception/.history/index_20210527212746.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 448 bytes
Line 
1/*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
2
3if (!globalThis.DOMException) {
4 const { MessageChannel } = require('worker_threads'),
5 port = new MessageChannel().port1,
6 ab = new ArrayBuffer()
7 try { port.postMessage(ab, [ab, ab]) }
8 catch (err) {
9 err.constructor.name === 'DOMException' && (
10 globalThis.DOMException = err.constructor
11 )
12 }
13}
14
15module.exports = globalThis.DOMException
Note: See TracBrowser for help on using the repository browser.