Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
反正有没有让这个方法返回?只是为了检查它是否被执行?
context.drawImage(video,0,0,100,200);
谢谢
该方法返回void(参见w3 规范):
void
// drawing images void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, unrestricted double dx, unrestricted double dy);
这里有一些关于如何对canvas代码进行单元测试的好建议。
canvas