in with the new
This commit is contained in:
20
src/core/window.js
Normal file
20
src/core/window.js
Normal file
@@ -0,0 +1,20 @@
|
||||
var win = {
|
||||
location: {},
|
||||
history: {},
|
||||
open: () => {},
|
||||
close: () => {}
|
||||
}
|
||||
|
||||
try {
|
||||
win = window
|
||||
var props = ["File", "Blob", "FormData"]
|
||||
for (var prop of props) {
|
||||
if (prop in window) {
|
||||
win[prop] = window[prop]
|
||||
}
|
||||
}
|
||||
} catch( e ) {
|
||||
console.error(e)
|
||||
}
|
||||
|
||||
export default win
|
||||
Reference in New Issue
Block a user