ccorcos/meteor-clientside-image-manipulation

TypeError: Image is not a function on Chrome 42

Closed this issue · 6 comments

TypeError: Image is not a function
at processImage (ccorcos_clientside-image-manipulation.js:958)

  canvas = document.createElement('canvas');                                                // 956
  ctx = canvas.getContext("2d");                                                            // 957
  img = new Image();                                                                        // 958
  url = (window.URL ? window.URL : window.webkitURL);                                       // 959
  img.src = url.createObjectURL(imageFile);                                                 // 960
  return img.onload = function(e) {             

You probably redefined Image to be something else. Its a native object. Open up your console on this webpage and try it.

The issue found on meteor android with crosswalk.
image

Image() constructor is just a recommendation for HTML5 W3C. Is there any workaround on browser that don't support Image()?

Solved. It is caused by one of my meteor package which exports Image. Thanks for your tips!

Haha well there you go!

Sent from my iPhone

On Sep 13, 2015, at 00:09, byrne-yan notifications@github.com wrote:

Solved. It is caused by one of my meteor package which exports Image. Thanks for your tips!


Reply to this email directly or view it on GitHub.