Is there a way to detect the maximum width and height for canvas element? I'm trying to serve different image sizes depending on the user support for that tag
Edit: Here are more details...
I'm using Three.js with canvas renderer. When passing it a large texture some devices couldn't load them because the canvas size limit (iPhone 4 for example). But it fails silently so i can't do nothing to detect it and load a smaller texture. So i need a way to know what is the max size of the canvas element to load the proper file.
also tried to oversize it like this to catch an error
var backCanvas = document.createElement('canvas');
var img = $('img').get(0);
img.width= 90000;
backCanvas.getContext('2d').drawImage(img,0,0,90000,90000)