Swiper: Support for Number.isNan in IE11

Created on 15 Jul 2020  路  2Comments  路  Source: nolimits4web/swiper

  • [ ] bug
  • [x] enhancement
  • [x] feature-discussion (RFC)

  • Swiper Version: 6.0.0

  • Platform/Target and Browser Versions: Internet Explorer 11

I know that you remove the support for IE in v5.0.0, but it is been working fine till v6.0.0 came along, and the only issue in IE11 is the Number.isNan() js built-in is not supported

Unfortunately I still have to give IE11 support in the projects I work, and for me is a shame that I can't use the v6+ only due to this issue.

Would be possible to have a polyfill or something like that to support it?
I've tried using the polyfill before the swiper js file but it won't work.

I know this is an odd request, but I appreciate if you could give some feedback on this.

Most helpful comment

Just add polyfil on your code before your include Swiper:

Number.isNaN = Number.isNaN || function(value) {
  return typeof value === 'number' && isNaN(value);
}

All 2 comments

Just add polyfil on your code before your include Swiper:

Number.isNaN = Number.isNaN || function(value) {
  return typeof value === 'number' && isNaN(value);
}

Completely forgot to reply , that Issue I was able to do it, but some classes aren't being added in swiper-slide which makes the layout all over the place, for now (and hopefully only till august 2021) I'll be using the v5 and whenever I don't need the support for IE I'll use the 6+

Was this page helpful?
0 / 5 - 0 ratings