dynamic-import-ref.html (274B)
1 <!DOCTYPE html> 2 <canvas id ="output" width="100" height="100" style="background: blue;"></canvas> 3 <script> 4 "use strict"; 5 const canvas = document.getElementById('output'); 6 const ctx = canvas.getContext('2d'); 7 8 ctx.fillStyle = 'green'; 9 ctx.fillRect(0, 0, 100, 100); 10 </script>