1799495-1.html (708B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script> 5 window.addEventListener('load', async () => { 6 const canvas1 = document.createElement('canvas') 7 document.documentElement.appendChild(canvas1) 8 const context1 = canvas1.getContext('2d') 9 context1.globalCompositeOperation = 'destination-atop' 10 const path = new Path2D() 11 context1.fill(path, 'nonzero') 12 const canvas2 = document.createElement('canvas') 13 const context2 = canvas2.getContext('2d', {}) 14 await window.createImageBitmap(canvas1, 124, 233, 2147483647, 1, {}) 15 context2.filter = 'invert( 90% )' 16 context2.fillRect(-1, -128, 4096, 1024) 17 }) 18 </script> 19 </head> 20 </html>