I am getting this error on my SharePoint site, which breaks many functionality, like the list AddNew form UI, which is coming out distorted in IE. The error is due to the fact that "attachEvent" is a deprecated function. This error is occurring in the init.js file, which is provided out-of-the-box by SharePoint.
Google Chrome and Mozilla Firefox are handling this error, but IE is unable to do that.
Add the JavaScript code snippet to the JS file used in the master page or used globally.
<script language="javascript">
if (typeof browseris !== 'undefined') {
browseris.ie = false;
}
</script>
🚀 "Happy Coding" 🚀