Closed rendomnet closed 2 years ago
I'm trying to use it inside Chrome extension background.js which is service worker.
global.XMLHttpRequest = require('xhr2'); And it gives me this error. background.js:7 Uncaught ReferenceError: window is not defined
global.XMLHttpRequest = require('xhr2');
background.js:7 Uncaught ReferenceError: window is not defined
I'm trying to use it inside Chrome extension background.js which is service worker.
global.XMLHttpRequest = require('xhr2');
And it gives me this error.background.js:7 Uncaught ReferenceError: window is not defined