main
Last change
on this file since b78c0c1 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
384 bytes
|
Line | |
---|
1 | /*! blob-to-buffer. MIT License. Jimmy Wärting <https://jimmy.warting.se> */
|
---|
2 |
|
---|
3 | if (!globalThis.DOMException) {
|
---|
4 | const { MessageChannel } = require('worker_threads')
|
---|
5 | const port = new MessageChannel().port1
|
---|
6 | const ab = new ArrayBuffer()
|
---|
7 | try { port.postMessage(ab, [ab, ab]) }
|
---|
8 | catch (err) { globalThis.DOMException = err.constructor }
|
---|
9 | }
|
---|
10 |
|
---|
11 | module.exports = globalThis.DOMException
|
---|
Note:
See
TracBrowser
for help on using the repository browser.