chushihua
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
import document from './document';
|
||||
|
||||
const win = (typeof window === 'undefined') ? {
|
||||
document,
|
||||
navigator: {
|
||||
userAgent: '',
|
||||
},
|
||||
location: {},
|
||||
history: {},
|
||||
CustomEvent: function CustomEvent() {
|
||||
return this;
|
||||
},
|
||||
addEventListener() {},
|
||||
removeEventListener() {},
|
||||
getComputedStyle() {
|
||||
return {
|
||||
getPropertyValue() {
|
||||
return '';
|
||||
},
|
||||
};
|
||||
},
|
||||
Image() {},
|
||||
Date() {},
|
||||
screen: {},
|
||||
setTimeout() {},
|
||||
clearTimeout() {},
|
||||
} : window; // eslint-disable-line
|
||||
|
||||
export default win;
|
||||
Reference in New Issue
Block a user