atom-community / atom-script

:runner: Run ( scripts | selections | source ) in Atom
https://atom.io/packages/script
MIT License
734 stars 269 forks source link

Add support for HTML #2705

Open Bigrum547 opened 2 years ago

Bigrum547 commented 2 years ago

window.onload = function() { // Some code var c = document.getElementById("canvas"); var ctx= c.getContent('2D'); ctx.beginPath(); ctx.rect(0, 0, 60, 20); ctx.fillStyle = 'limegreen'; ctx.fill(); ctx.beginPath(); ctx.moveTo(0,0); ctx.lineTo(50,50); ctx.stroke(255); why is this code not performing any thing? it is not throwing error either.