D
D
Dmitry Larin2018-02-06 13:57:11
JavaScript
Dmitry Larin, 2018-02-06 13:57:11

What about devices that don't support ES5?

In general, SPA was made by order for vuejs. Everything works great until ... until they receive a complaint that nothing works on the client's client's phone (the user who logged into the SPA). After a little investigation, it turned out that the page was visited from iphone4. There is ios 9, whose safari does not support es5. What to do with such users? Convert everything to es3? Bye vue hello jQuery? Make a separate page for such users? Show window asking to update ios/download chrome? How to properly handle such situations?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2018-02-06
@fanrok

1) You can compile the code in es3 with Babel
2) You can use the polyfill https://babeljs.io/docs/usage/polyfill/
https://polyfill.io/v2/docs/
3) You can load the polyfill only to those devices that do not support es6
https://philipwalton.com/articles/loading-polyfill...

R
Roman Kitaev, 2018-02-06
@deliro

Vue actively uses defineProperty, and this is ES5. Compiling for ES3 will not work. If the TOR did not specify on which browsers the client wants your SPA to work, these are the client's problems. For such, a banner is usually hung up stating that their browser, although well done, that it survived the Mesozoic, it would be time to update already.
And if you look from the side of the customer, then you need to drop support by comparing the cost of ES3 support and how many clients of the service, who have only ES3, bring money

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question