moxiecode / moxie

Pollyfills for XHR2 and File API
GNU Affero General Public License v3.0
486 stars 135 forks source link

mOxie .onload is not executed in plupload >= 2.2.0 #169

Closed georgekaf closed 7 years ago

georgekaf commented 7 years ago

Since plupload 2.2.0 I am having a weird issue with my code below. The .onload is never called/executed. The same code is working with plupload 2.1.9.

var preloader = new mOxie.Image();

 // Define the onload BEFORE you execute the load()
  preloader.onload = function () {
      console.log('onload',preloader); // <- this line is not executed

      var width = preloader.width;
      var height = preloader.height;
      preloader.downsize(250, 250);

      //show image thumbnail
      .
      .
      .
      .

 };

console.log('onload',preloader); // all is fine
preloader.load(file.getSource());

Is this a mOxie issue? Do I need to rewrite it in a certain way?

jayarjo commented 7 years ago

Sorry missed this ticket. We've dropped mOxie namespace. There were too many and people complained. Also we required a way to make it compatible with AMD/CJS loaders. You can revive it by loading/bundling this small compatibility shim after you load plupload/moxie.

Or check an alternative syntax, that should work for you right away: http://play.plupload.com/j__J_/1.

adrestios commented 5 years ago

How do you solve this problem?