This repository has been archived by the owner on Feb 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Enabled polyfill to initialize after load when being fetched asynch…
…ronously Signed-off-by: Christian Schepp Schaefer <[email protected]>
- Loading branch information
Showing
7 changed files
with
40 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Changelog | ||
|
||
### 0.2.0 (November 24th, 2013) | ||
### 0.3.1 (January 23rd, 2014) | ||
|
||
* Enabled polyfill to initialize after load when being fetched asynchronously | ||
|
||
### 0.3.0 (November 24th, 2013) | ||
|
||
* Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
* @author: Anselm Hannemann <[email protected]> | ||
* @author: Christian "Schepp" Schaefer <[email protected]> | ||
* @version: 0.3.0 | ||
* @version: 0.3.1 | ||
* | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,7 +194,7 @@ | |
* | ||
* @author: Anselm Hannemann <[email protected]> | ||
* @author: Christian "Schepp" Schaefer <[email protected]> | ||
* @version: 0.3.0 | ||
* @version: 0.3.1 | ||
* | ||
*/ | ||
|
||
|
@@ -543,15 +543,21 @@ | |
if (objectFit._debug && window.console) { | ||
console.log('object-fit not natively supported'); | ||
} | ||
if (window.addEventListener) { | ||
window.addEventListener('load', function(){ | ||
objectFit.init(args); | ||
}, false); | ||
} else { | ||
window.attachEvent('onload', function(){ | ||
objectFit.init(args); | ||
}); | ||
} | ||
// If the library is loaded after document onload event | ||
if(document.readyState === 'complete') { | ||
objectFit.init(args); | ||
} else { | ||
// Otherwise attach event listeners | ||
if (window.addEventListener) { | ||
window.addEventListener('load', function(){ | ||
objectFit.init(args); | ||
}, false); | ||
} else { | ||
window.attachEvent('onload', function(){ | ||
objectFit.init(args); | ||
}); | ||
} | ||
} | ||
} else { | ||
if (objectFit._debug && window.console) { | ||
console.log('object-fit natively supported'); | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters