window.onload = function () {
document.getElementById('saveAs').addEventListener('click', function () {
var box = document.getElementById('poster')
html2canvas(box, {
useCORS: true,
allowTaint: true,
taintTest: false,
scrollX: 0,
scrollY: 0,
backgroundColor: 'transparent'
}).then(canvas => {
const el = document.createElement('a')
el.download = new Date().getTime()
el.href = canvas.toDataURL('image/png')
el.click()
}).catch(e => {
});
})
}