kamranahmedse / driver.js

A light-weight, no-dependency, vanilla JavaScript engine to drive user's focus across the page
https://driverjs.com
MIT License
22.45k stars 1.01k forks source link

Can IE11 be supported any more? #502

Open Lordrian opened 2 months ago

Lordrian commented 2 months ago

Hi , I'm using driver.js@1.3.1 in my project, I found it can not work on IE11, and this problem has been mentioned in here. But I still wanna use new ablilties in latest version, so will IE11 be supported any more?

Hope for applies, Thx.

mlisowsk commented 2 months ago

Can you post the exact error message from the browser console? I am still using driver.js v0.98 and also need IE11 support, hesitating to make the switch to v1.x.

One solution could be to generate your own minified version by using vite options to restrict to IE11 feature set. Try changing vite.config.ts line 18 from target: "ES2019" to target: "IE11". Then rebuild the minified file by running npm run build. That could work if no polyfills are needed.

Lordrian commented 2 months ago

Can you post the exact error message from the browser console? I am still using driver.js v0.98 and also need IE11 support, hesitating to make the switch to v1.x.

One solution could be to generate your own minified version by using vite options to restrict to IE11 feature set. Try changing vite.config.ts line 18 from target: "ES2019" to target: "IE11". Then rebuild the minified file by running npm run build. That could work if no polyfills are needed.

Thank you for your reply. There's no error message on the browser console, but my page became white. Your advise seems working in TS, but my project didn't use it. Babel-polyfill(ver6.26.0) doesn't make driver.js work in my project as well.