1

I'm trying to use https://github.com/blueimp/JavaScript-Load-Image with my Rails 4.2 application and I'm seeing behavior that I cannot explain. The original javascript that I'm putting in my vendor folder will have a line like

var useCanvas = img.getContext || (loadImage.hasCanvasOption(options) && canvas.getContext)

that when I view it in the Chrome debugger shows as

var useCanvas = img.getContext || (loadImage.requiresCanvas(options) && !!loadImage.global.HTMLCanvasElement)

I didn't find any reference in the asset pipeline documentation that mentions creating a global variable like that. It is probably a simple feature that I'm missing somewhere.

json
  • 141
  • 10

0 Answers0