<canvas id="canvas"></canvas>
<div class="hidden">
<img
id="source"
src="https://mdn.github.io/shared-assets/images/examples/rhino.jpg"
width="300"
height="227" />
</div>CanvasRenderingContext2D: drawImage() method / notebook
CanvasRenderingContext2D: drawImage() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.