1696511.html (647B)
1 <!DOCTYPE html> 2 <html class='reftest-wait'> 3 <head> 4 <script> 5 document.addEventListener('DOMContentLoaded', async () => { 6 const canvas = document.createElement('canvas') 7 canvas.height = 27530 8 const context = canvas.getContext('2d') 9 context.strokeRect(5, 5, canvas.width - 5, canvas.height - 5) 10 const stream = canvas.captureStream() 11 const recorder = new MediaRecorder(stream) 12 recorder.start() 13 const stopped = new Promise(r => recorder.onstop = r) 14 await new Promise(r => setTimeout(r, 100)) 15 stream.getTracks().forEach(t => t.stop()) 16 await stopped 17 document.documentElement.removeAttribute("class") 18 }) 19 </script> 20 </head> 21 </html>