Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
`addTest()` dot properties only work internally #1355
Well, sorta. Given a page which has already loaded a reasonably comprehensive v3 build…
This throws an error:
> Modernizr.addTest('mytest.thing', true); TypeError: Cannot read property 'thing' of undefined
This doesn’t work as I’d expect:
> Modernizr.addTest('mytest', true); > Modernizr.mytest true > Modernizr.addTest('mytest.thing', true); > Modernizr.mytest.thing undefined
But this does work as I’d expect:
> Modernizr.addTest('audio.mycodec', 'probably'); > Modernizr.audio.mycodec 'probably'
Are we going to “fix” this for v3, or leave it as an undocumented feature we only exercise internally?