diff --git a/Base/home/anon/www/canvas-path-quadratic-curve.html b/Base/home/anon/www/canvas-path-quadratic-curve.html index 89c4a1d098..0985f97184 100644 --- a/Base/home/anon/www/canvas-path-quadratic-curve.html +++ b/Base/home/anon/www/canvas-path-quadratic-curve.html @@ -9,7 +9,7 @@ function drawSomeCurves() { -var canvas = document.querySelectorAll("canvas")[0]; +var canvas = document.querySelector("canvas"); var ctx = canvas.getContext("2d"); var x = 150; var y = 150; diff --git a/Base/home/anon/www/canvas-path.html b/Base/home/anon/www/canvas-path.html index 2f6c26c068..b44c7d655f 100644 --- a/Base/home/anon/www/canvas-path.html +++ b/Base/home/anon/www/canvas-path.html @@ -9,7 +9,7 @@ function drawHouse() { -var ctx = document.querySelectorAll("canvas")[0].getContext("2d"); +var ctx = document.querySelector("canvas").getContext("2d"); ctx.fillStyle = 'black'; ctx.fillRect(0, 0, 300, 300); diff --git a/Base/home/anon/www/img-canvas.html b/Base/home/anon/www/img-canvas.html index 5a4f0fde80..a21add25ac 100644 --- a/Base/home/anon/www/img-canvas.html +++ b/Base/home/anon/www/img-canvas.html @@ -9,10 +9,10 @@