spiderplant0
spiderplant0

Reputation: 3952

Modernizer conditional load of polyfill

I am using a javascript library that uses CustomEvent that doesnt seem to be fully supported in Android 4.1. So I thought I'd use Modernizer to conditionally load a CustomEvent polyfill in browsers where it is missing.

But I get an error: TypeError: Modernizr.load is not a function

Can someone please confirm I've not gone completely off piste here and I'm using modernizer correctly? And do I have to download another script or something to get the Modernizer.load function? (Modernizer seems to have changed since similar questions were asked).

Upvotes: 0

Views: 237

Answers (1)

Patrick
Patrick

Reputation: 13974

Modernizr.load was removed from Modernizr

Modernizr.load has been deprecated in favor of using yepnope.js directly; from v3.0, yepnope.js must be included in the page in order for Modernizr.load to work: calling .load() will simply pass the arguments on to yepnope(); this will be removed fully in a future release (#1241)

Upvotes: 1

Related Questions