i beginner programmer, excuse me if solution 1 simple (although have looked hard finding already-posted solution). debugging code , error message when running program:
"uncaught typeerror: v.setcanvassize not function (in file1.js line 7)"
i assumed issue not yet having created setcanvassize function yet before doing stuff it. created timeout, doesn't seem either.
file1.js
v = new v3(v3); settimeout ( function() { v.setcanvassize ({ width: 500, height: 300 }, function(result, err) { console.log(result); } ); }, 1000 ); file2.js
v3 = typeof v3 === "undefined" ? {} : v3; v3.file2 = function() { this.setcanvassize = function(){}; };
Comments
Post a Comment