Created
December 12, 2011 04:45
-
-
Save ryanseddon/1464972 to your computer and use it in GitHub Desktop.
Extending modernizr core tests without changing the core
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
if(Modernizr.postmessage) { | |
// So we can extend it but still do `if(Modernizr.postmessage)` | |
Modernizr.postmessage = new Boolean(true); | |
Modernizr.postmessage.extend = function() { | |
// Do some tests | |
return bool; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah.
I think that makes a lot of sense.