New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stucox opened this Issue May 20, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@stucox
Member

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
  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'

/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

@patrickkettner

This comment has been minimized.

Member

patrickkettner commented May 20, 2014

@patrickkettner

This comment has been minimized.

Member

patrickkettner commented Jun 14, 2014

@stucox - what do you think we should do?

@stucox

This comment has been minimized.

Member

stucox commented Aug 20, 2014

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

@stucox stucox modified the milestones: Modernizr v3, Modernizr v3.1 Aug 20, 2014

@rejas

This comment has been minimized.

Collaborator

rejas commented Jun 20, 2018

Removing milestone since @stucox never thought about it ;-)

@rejas rejas removed this from the Modernizr v3.1 milestone Jun 20, 2018

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