vanilla-recycler-view
Version:
high performance UI rendering library for web browser
20 lines • 678 B
JavaScript
;
var _a = document.body.getClientRects()[0], width = _a.width, height = _a.height;
var lastWidth = width;
var lastHeight = height;
setInterval(function () {
var _a = document.body.getClientRects()[0], width = _a.width, height = _a.height;
if (width !== lastWidth || height !== lastHeight) {
var e = document.createEvent('CustomEvent');
e.initCustomEvent('zoom', false, false, {
detail: {
width: width,
height: height,
},
});
document.body.dispatchEvent(e);
lastWidth = width;
lastHeight = height;
}
}, 100);
//# sourceMappingURL=zoom-listener.js.map