`addTest()` dot properties only work internally #1355

stucox opened this Issue May 20, 2014 · 3 comments


None yet

2 participants

stucox commented May 20, 2014

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
> Modernizr.addTest('mytest.thing', true);
> Modernizr.mytest.thing

But this does work as I’d expect:

> Modernizr.addTest('audio.mycodec', 'probably');
> Modernizr.audio.mycodec

/cc @SlexAxton

Are we going to “fix” this for v3, or leave it as an undocumented feature we only exercise internally?

@stucox stucox added this to the Modernizr v3 milestone May 20, 2014

@stucox - what do you think we should do?

stucox commented Aug 20, 2014

Moving to 3.1 milestone so I don’t have to think about it.

@stucox stucox modified the milestone: Modernizr v3, Modernizr v3.1 Aug 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment