Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap)'
- drawImage — index.html:39TypeError: Type error
- window.addEventListener('load', eventWindowLoadew,false);
- function eventWindowLoadew(){
- canvasApp();
- }
- function canvasSupport(){
- return Modernizr.canvas;
- }
- function canvasApp(){
- if(!canvasSupport()){
- return;
- } else {
- var canvas = document.getElementById("mycanvas");
- var ctx = canvas.getContext("2d");
- }
- drawScreen();
- var image1 = new Image();
- image1.src = "mon_024.png";
- image1.addEventListener("load", eventMonsterLoaded, false);
- function eventMonsterLoaded(){
- drawScreen();
- }
- function drawScreen(){
- ctx.drawImage(image1, 0, 0); //39行目です。ここにエラーがでます。
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement