remove Modernizr.load - fixes #1182 #1241

Merged
merged 1 commit into from Mar 2, 2014

Projects

None yet

2 participants

@patrickkettner
Member

No description provided.

@stucox stucox and 1 other commented on an outdated diff Mar 1, 2014
- ! started && executeStack();
-
- if ( first ) {
- if ( elem != "img" ) {
- sTimeout( function () {
- insBeforeObj.removeChild( preloadElem );
- }, 50);
- }
-
- for ( var i in scriptCache[ url ] ) {
- if ( scriptCache[ url ].hasOwnProperty( i ) ) {
- scriptCache[ url ][ i ].onload();
- }
- }
+ ModernizrProto.load = function() {
+ log('Modenizr.load has been removed. Please upgrade your code to use yepnope directly');
@stucox
stucox Mar 1, 2014 Member

Can we make this a bit friendlier / more helpful?

yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. Get it from http://yepnopejs.com and update your code to use it directly.
See http://github.com/Modernizr/Modernizr/issues/1182 for more information.

Also, I thought the plan was to only error if yepnope isn’t present? (and warn if it is – see below)

@patrickkettner
patrickkettner Mar 1, 2014 Member

Can we make this a bit friendlier / more helpful?

yep! intentionally left poorly worded to make sure we talk about it here

Also, I thought the plan was to only error if yepnope isn’t present? (and warn if it is – see below)

my mistake. updating...

@stucox stucox commented on an outdated diff Mar 1, 2014
- // Handle memory leak in IE
- preloadElem.onload = preloadElem.onreadystatechange = null;
- }
- }
+ if ('yepnope' in window) {
+ window.yepnope.apply(window, [].slice.call(arguments,0));
@stucox
stucox Mar 1, 2014 Member

We agreed to warn if yepnope is present – could be something like:

yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. yepnope appears to be available on the page, so we’ll use it to handle this call to Modernizr.load, but please update your code to use yepnope directly.
See http://github.com/Modernizr/Modernizr/issues/1182 for more information.
@patrickkettner
Member

updated

@stucox
Member
stucox commented Mar 2, 2014

LGTM! 👍

@stucox stucox merged commit 5477732 into Modernizr:master Mar 2, 2014

1 check passed

default The Travis CI build passed
Details
@patrickkettner patrickkettner deleted the patrickkettner:unload branch Mar 2, 2014
@stucox stucox referenced this pull request Mar 2, 2014
Closed

v3.0 release notes #805

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment