13 lines
1.4 KiB
JavaScript
13 lines
1.4 KiB
JavaScript
/**
|
|
* SSR Window 1.0.1
|
|
* Better handling for window object in SSR environment
|
|
* https://github.com/nolimits4web/ssr-window
|
|
*
|
|
* Copyright 2018, Vladimir Kharlampidi
|
|
*
|
|
* Licensed under MIT
|
|
*
|
|
* Released on: July 18, 2018
|
|
*/!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.ssrWindow={})}(this,function(e){"use strict";var n="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,t="undefined"==typeof window?{document:n,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window;e.window=t,e.document=n,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
//# sourceMappingURL=ssr-window.min.js.map
|