Skip to content
This repository

fix for #1133 so that IE9+ which has readystatechange for legacy #1148

merged 1 commit into from over 1 year ago

2 participants

Dimitar Christoff Arian Stolwijk
Dimitar Christoff

flipped feature check to take advantage of addEventListener for load instead, if available - ie9 reports readystatechange on the element despite being able to add normal events.

Arian Stolwijk arian merged commit 7b9a879 into from August 28, 2012
Arian Stolwijk arian closed this August 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 28, 2012
Dimitar Christoff fix for #1133 so that IE9+ which have readystatechange for legacy tak…
…e advantage of addEventListener for load instead
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  Source/Utilities/Assets.js
2  Source/Utilities/Assets.js
@@ -35,7 +35,7 @@ var Asset = {
35 35
 		delete properties.document;
36 36
37 37
 		if (load){
-			if (typeof script.onreadystatechange != 'undefined'){
+			if (!script.addEventListener){
39 39
 				script.addEvent('readystatechange', function(){
40 40
 					if (['loaded', 'complete'].contains(this.readyState));
41 41

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.