What makes a CanvasRenderingContext2D a CanvasRenderingContext2D?
问题 Consider the following web page. <html> <body> <canvas id="canvas" width="300" height="300" style="border:1px solid #000000;"> </canvas> </body> </html> I open this page in Firefox, open the JS console and type the following. > document.getElementById("canvas").getContext("2d") The output is as follows: CanvasRenderingContext2D { canvas: canvas#canvas, mozCurrentTransform: (6) […], mozCurrentTransformInverse: (6) […], mozTextStyle: "10px sans-serif", mozImageSmoothingEnabled: true,