Skip to content

Commit 7010145

Browse files
committed
add atob polyfill
1 parent 826430d commit 7010145

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@
2828
"three": "^0.108.0",
2929
"webpack": "^4.39.1",
3030
"webpack-cli": "^3.3.6"
31+
},
32+
"dependencies": {
33+
"abab": "^2.0.3"
3134
}
3235
}

src/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {atob as _atob} from 'abab';
12
import _XMLHttpRequest from './XMLHttpRequest'
23

34
export function createScopedThreejs(canvas) {
@@ -21,6 +22,12 @@ export function createScopedThreejs(canvas) {
2122
removeEventListener: function() {},
2223
URL: {},
2324
}
25+
26+
// eslint-disable-next-line
27+
const atob = (a) => {
28+
return _atob(a)
29+
}
30+
2431
// eslint-disable-next-line
2532
const XMLHttpRequest = _XMLHttpRequest
2633

0 commit comments

Comments
 (0)