When we open or save files in a SharePoint library from within Word, Excel or other client applications, we get javascript errors in the browse window. There are always two errors, one from init.js and another from core.js. You are asked whether you want to continue running scripts and once the errors have been clicked away, everything works as normal. These errors only occur within the client applications, not when you access the library via the browser.
An error has occurred in the script on this page Line: 1 Character: 118138 Error: Identifier expected. Code: 0 URL: https://sharepoint/_layouts/15/init.js
Do you want to continue running scripts on this page? Yes/No
We have SharePoint SE on premise and the latest Office.