Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
window.map.once("rendercomplete", function() {
htmlToImage.toBlob(window.map.getTargetElement()).then(function(blob) {
window.saveAs(blob, "map.png");
});
});