Skip to content

Commit 9d9a4bf

Browse files
author
Eric Ente
committed
Prevent ImageLoader._formatResult() from detrimentally delaying loaded Image availability in Internet Explorer
1 parent 0a87ed2 commit 9d9a4bf

File tree

7 files changed

+38
-23
lines changed

7 files changed

+38
-23
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ progress and complete events. Check out the [docs](http://createjs.com/Docs/Prel
3434
* Added a checks for url parsing errors, so that you can see what url is missing a file extension and is breaking LoadQueue.
3535
* Made a small change to XHRRequest's _checkError() to be more Cordova friendly.
3636
* Removed version number from built files, versioning is handled by the Git tags & Bower.
37-
* Added a fallback in ImageLoader._formatResult() to handle iOS6 and other browsers that don't do URL.createObjectURL() properly.
37+
* Added a fallback in ImageLoader._formatResult() to handle iOS6 and other browsers that don't do URL.createObjectURL() properly.
38+
* Prevent ImageLoader._formatResult() from detrimentally delaying loaded Image availability in Internet Explorer

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "PreloadJS",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"homepage": "https://github.com/CreateJS/PreloadJS",
55
"authors": [
66
"gskinner",

build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "PreloadJS",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "PreloadJS Docs",
55
"url": "http://www.createjs.com/#!/PreloadJS",
66
"logo": "assets/docs-icon-PreloadJS.png",

docs/PreloadJS_docs.zip

160 Bytes
Binary file not shown.

lib/preloadjs.combined.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ this.createjs = this.createjs || {};
4848
* @type {String}
4949
* @static
5050
**/
51-
s.version = /*=version*/"0.6.0"; // injected by build process
51+
s.version = /*=version*/"0.6.1"; // injected by build process
5252

5353
/**
5454
* The build date for this release in UTC format.
5555
* @property buildDate
5656
* @type {String}
5757
* @static
5858
**/
59-
s.buildDate = /*=date*/"Thu, 05 Feb 2015 19:09:21 GMT"; // injected by build process
59+
s.buildDate = /*=date*/"Fri, 06 Mar 2015 20:34:00 GMT"; // injected by build process
6060

6161
})();
6262

@@ -6109,21 +6109,28 @@ this.createjs = this.createjs || {};
61096109
if(objURL) {
61106110
tag.src = objURL;
61116111
tag.onload = function () {
6112-
URL.revokeObjectURL(_this.src);
6112+
URL.revokeObjectURL(this.src);
6113+
done(this);
61136114
}
61146115
}
61156116
else {
61166117
tag.src = loader.getItem().src;
6118+
if (tag.complete) {
6119+
done(tag);
6120+
} else {
6121+
tag.onload = function () {
6122+
done(this);
6123+
}
6124+
}
61176125
}
61186126
} else {
61196127
tag.src = loader.getItem().src;
6120-
}
6121-
6122-
if (tag.complete) {
6123-
done(tag);
6124-
} else {
6125-
tag.onload = function () {
6126-
done(this);
6128+
if (tag.complete) {
6129+
done(tag);
6130+
} else {
6131+
tag.onload = function () {
6132+
done(this);
6133+
}
61276134
}
61286135
}
61296136
};

lib/preloadjs.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/preloadjs/loaders/ImageLoader.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,28 @@ this.createjs = this.createjs || {};
140140
if(objURL) {
141141
tag.src = objURL;
142142
tag.onload = function () {
143-
URL.revokeObjectURL(_this.src);
143+
URL.revokeObjectURL(this.src);
144+
done(this);
144145
}
145146
}
146147
else {
147148
tag.src = loader.getItem().src;
149+
if (tag.complete) {
150+
done(tag);
151+
} else {
152+
tag.onload = function () {
153+
done(this);
154+
}
155+
}
148156
}
149157
} else {
150158
tag.src = loader.getItem().src;
151-
}
152-
153-
if (tag.complete) {
154-
done(tag);
155-
} else {
156-
tag.onload = function () {
157-
done(this);
159+
if (tag.complete) {
160+
done(tag);
161+
} else {
162+
tag.onload = function () {
163+
done(this);
164+
}
158165
}
159166
}
160167
};

0 commit comments

Comments
 (0)