When navigating around in an React 16.6.3 web application I suddenly get this error message when pressing a button in IE11 only:

Have been unable to provide a minimal use case, sorry.
In my webpack config:
``
new BrowserSyncPlugin({
host: process.env.IPADDRESS,
port: Number(process.env.PORT) + 1,
proxy: 'http://' + process.env.IPADDRESS + ':' + process.env.PORT,
minify: false,
proxyOptions: {
// https://github.com/Browsersync/browser-sync/issues/430
xfwd: true, // Forward all headers thru the proxy
changeOrigin: false, // Keep the original origin
},
open: false, // Open a browser
cors: true, // Set the CORS headers to allow CORS
}),
Yup, I had the same issue preventing BrowserSync working in Edge.
Edge doesn't implement HTMLElement.prototype.scrollTo: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15534521/
And in set-scroll.ts, Browser-Sync calls this method.
I opened a PR to fix this.
I setup a workaround for my need (hack)聽:
browserSync.use({
plugin() {},
hooks: {
'client:js': 'if (!HTMLElement.prototype.scrollTo) { HTMLElement.prototype.scrollTo = function (left, top) {this.scrollTop = top; this.scrollLeft = left; } }'
}
});
Most helpful comment
Yup, I had the same issue preventing BrowserSync working in Edge.
Edge doesn't implement HTMLElement.prototype.scrollTo: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15534521/
And in set-scroll.ts, Browser-Sync calls this method.
I opened a PR to fix this.
I setup a workaround for my need (hack)聽: