Elderjs/elderjs

Lazy loading on safari

jinyus opened this issue · 2 comments

The docs mention that lazy hydration is implemented with requestIdleCallback but no version of safari supports this: https://caniuse.com/?search=requestIdleCallback

Does the framework adjust its behavior when running on safari or should we avoid using this option if we want to target iOS/Mac?

Interested to hear about this as well.

I think they use a simple polyfill for that, by looking at the code:

const requestIdleCallback = window.requestIdleCallback || ( cb => window.setTimeout(cb,1) );