CreateJS / PreloadJS

PreloadJS makes preloading assets & getting aggregate progress events easier in JavaScript. It uses XHR2 when available, and falls back to tag-based loading when not.
http://createjs.com/
MIT License
2.88k stars 761 forks source link

_this is not defined... only on Firefox? #233

Closed sortofsleepy closed 7 years ago

sortofsleepy commented 7 years ago

Hello!

I see this has been filed as a bug before that sounded like it had been fixed - but unfortunately it seems to have made it's way back. There are also some additional strange errors that might be in relation(see screenshot)

I'm seeing this behavior in Firefox only, Chrome for whatever reason is ok (Safari and IE are not a part of my requirements so I haven't tested them)

I've tried all of the 0.6.2 release libraries both the regular and NEXT versions 😢

Any ideas on whats wrong? Looking at the unminified source, it looked like a simple mistake, but changing _this to this results in another strange error.

Trying this on Windows 10 if that happens to affect things.

Help is appreciated!

After correcting variable preloadjs-bad-fix

Before correcting variable preloadjs

Line in code where mistake(?) happens preloadjs2

lannymcnie commented 7 years ago

This issue was resolved in December, 2015 - about a month after the release of 0.6.2 -- so that version (both combined and min) will have that issue.

The approach was changed to pass an event instead (March 2017), and the NEXT version reflects that change. You can see it here: https://github.com/CreateJS/PreloadJS/blob/master/lib/preloadjs-NEXT.combined.js#L6844

Hope that helps!