Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
}
function addOverlay() {
return mountOverlay(document.querySelector('.overlay'));
}
function syncOverlay() {
if (overlay) {
overlay.update();
}
}
window.addEventListener('keyup', testKeys);
const app = view(({ key, diff }) => ['.noop.modal', { onclick: closeModal }, [
['.container', { style: `width:${images[key].width}px;height:${images[key].height}px`, onupdate: syncOverlay },
(diff
? [
['img', { src: images[key].images.out }],
] : [
['.layer', [
['img.a', { src: images[key].images.actual }],
]],
['.layer.overlay', [
['img.b', { src: images[key].images.base }],
]],
])
.concat([
['button.close', { onclick: () => closeModal() }, '×'],
]),
],