UNPKG

window-resizeto

Version:

A window.resizeTo polyfill for test environments like Jest & JSDOM

12 lines (10 loc) 283 B
function resizeTo(windowObj, width, height) { Object.assign(windowObj, { innerWidth: width, innerHeight: height, outerWidth: width, outerHeight: height }).dispatchEvent(new windowObj.Event('resize')); } export { resizeTo }; //# sourceMappingURL=index.esm.js.map