Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS injection broken in older browsers due to use of Array.from #1539

Closed
3 tasks
jhildenbiddle opened this issue Apr 18, 2018 · 2 comments
Closed
3 tasks

CSS injection broken in older browsers due to use of Array.from #1539

jhildenbiddle opened this issue Apr 18, 2018 · 2 comments

Comments

@jhildenbiddle
Copy link

Issue details

When CSS injection occurs, older browsers (most notably IE11) will throw an error due to lac of support for Array.from (which it does not support natively).

for (var _i = 0, _a = Array.from(this.document.getElementsByTagName('style')); _i < _a.length; _i++) {

for (var _b = 0, _c = Array.from(links); _b < _c.length; _b++) {

Steps to reproduce/test case

  1. Launch browser-sync
  2. Launch legacy browser
  3. Change a CSS file and confirm CSS injection is working on a modern browser
  4. Launch IE11 (or any browser without native support for Array.from
  5. Open console (F12 in IE11)
  6. Change CSS and view result in legacy browser.

In IE11, an is displayed that reads "Object doesn't support property or method 'from'", pointing to line 2459 of browser-sync-client.js (according to IE debugger).

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ 2.18.13 ]
  • Node [ 9.5.0 ]
  • Npm [ 5.7.1 ]

Affected platforms

  • [ X ] linux
  • [ X ] windows
  • [ X ] OS X
  • [ X ] freebsd
  • [ X ] solaris
  • [ X ] other (ALL)

Browsersync use-case

  • [ X ] API
  • Gulp
  • Grunt
  • CLI
@shakyShane
Copy link
Contributor

thanks @jhildenbiddle for the detailed report

this is fixed in browser-sync@2.23.7

:)

@jhildenbiddle
Copy link
Author

Just downloaded. Works great.

Thanks for the quick turnaround, @shakyShane !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants