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

should-degrade should degrade #94

Open
szepeviktor opened this issue Dec 30, 2013 · 6 comments
Open

should-degrade should degrade #94

szepeviktor opened this issue Dec 30, 2013 · 6 comments

Comments

@szepeviktor
Copy link

Please use jQuery on this page, e.g. Zepto does not support IE8.
http://wicky.nillia.ms/enquire.js/examples/should-degrade/

@WickyNilliams
Copy link
Owner

I've got some updates for the docs waiting to be pushed which (amongst
other things) drops all but necessary dependencies, so it won't need jQuery
or zepto at all in future :)

I'll close this issue when pushed
On 30 Dec 2013 18:27, "Szépe Viktor" notifications@github.com wrote:

Please use jQuery on this page, e.g. Zepto does not support IE8.
http://wicky.nillia.ms/enquire.js/examples/should-degrade/


Reply to this email directly or view it on GitHubhttps://github.com//issues/94
.

@szepeviktor
Copy link
Author

May I use your script in IE8 without a polyfill?
(I think should-degrade is for that)
(I've tested, and it breaks without matchMedia.js)

@WickyNilliams
Copy link
Owner

Yes, enquire assumes a polyfill has been loaded. if you don't want to include the whole polyfill you can easily provide a stub implementation for older browsers:

window.matchMedia = window.matchMedia || function() {
  return {
    matches : false,
    addListener : function() {},
    removeListener : function() {}
  }
};

enquire will then respect the shouldDegrade flag for older browsers without the need for an actual polyfill

@travm
Copy link

travm commented Jan 7, 2014

@WickyNilliams Great to hear about dropping the jQuery dependency! Looking forward to it!

@WickyNilliams
Copy link
Owner

This may have taken me 3 years, but I'm close to updating the docs to fix this. Thanks for your (extreme) patience 😆

@jpsc
Copy link

jpsc commented Sep 5, 2017

@WickyNilliams need any help with the docs ? Is there a branch ?

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

No branches or pull requests

4 participants