Is it possible to adjust the x and y position of a canvas element using only Javascript without relying on CSS? It’s a query that doesn’t seem to be popping up much online.
EDIT: Can this manipulation be achieved with HTML?
<html>
<title>Testing</title>
<canvas id="main" width="200" height="200" style="border:1px solid #c3c3c3;">
Error: Browser does not support canvas element.
</canvas>
<script type="text/javascript">
var main = document.getElementById("main");
var render = main.getContext("2d");
main.width = 200;
main.height = 200;
main.style.left = 100x;
main.style.top = 100px;
</script>
</html>