Skip to content
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

Remove Modernizr dependency #9

Closed
wants to merge 1 commit into from
Closed

Remove Modernizr dependency #9

wants to merge 1 commit into from

Conversation

sindresorhus
Copy link

No point in requiring Modernizr for so little code.

Had to wrap it in an IIFE, so not to expose the localStorage test.

Append ?w=1 to see the real changes.

No point in requiring Modernizr for so little code.
@paulirish
Copy link
Collaborator

Because the localstorage is so much tricker than everyone expected, i'm prone to just let this continue to defer to modernizr.

it's repo is the source of truth on best-in-class detects and I dont want to maintain detects downstream here too.

@sindresorhus
Copy link
Author

Sure, though, it's not like the test will change and it's like 5 lines, but ok. I can just use my fork.

@paulirish
Copy link
Collaborator

Well the test has changed at least 3 times since it landed in Modernizr: https://gist.github.com/paulirish/5558557

I don't trust any feature test to not change. The try/catch is kind of the
nuclear option, and we had to do it in this case. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants