What features of Zepto do not work on ie9?
Asked Answered
P

1

5

On the zepto project website i see no version of IE as being supported, not even 9.

I am considering using zepto in a webapp (not mobile) but i want to support IE 9+

Is that possible? What features / methods of zepto do not work on IE9?

Portuguese answered 17/5, 2012 at 7:6 Comment(0)
T
13

Out of curiosity I just loaded up the following page and tested in current versions of Chrome, Firefox, Safari and IE9. In all but IE9 I was greeted with the alert() message. IE9 gave me no alert and contained two errors in the console. Here's the code I used, with the Zepto library in the same folder.

<!doctype html>

<h1>Zepto Browser Support Test</h1>

<script src="zepto.min.js"></script>
<script>
  $(function () {
    alert('Zepto Ready Successful!');
  });
</script>

So, unfortunately for your web app, if you are trying to support IE9, it doesn't look like Zepto is going to work for you.

Although, what the good folks at Zepto encourage if you are trying to reach IE users is to fallback to jQuery. They even give you the code to do so.

If you need to support Internet Explorer, you can fall back on jQuery. Note that conditional comments are no longer supported starting on IE 10, so we recommend the following document.write approach:

<script>
document.write('<script src=' +
('__proto__' in {} ? 'zepto' : 'jquery') +
'.js><\/script>')
</script>

I found this in the Zepto docs near the top of the page. Hope that helps and good luck!

Tip answered 8/6, 2012 at 18:26 Comment(2)
It's worth noting that the reason that this works is because IE doesn't support __proto__. Nothing officially supports __proto__ because it isn't in the JS spec, though it might be in the next version: developer.mozilla.org/en-US/docs/JavaScript/Reference/…Larva
I find it interesting that you took the time to run this test, yet for some reason omitted the only piece of information that would actually answer his question. "What is missing from IE9?" - Those two console errors would have answered that. -.-Heartwhole

© 2022 - 2024 — McMap. All rights reserved.