I am getting the error
Critical Error: Object doesn\'t support this property or method addeventlistener
while accessing the Info
We have set compatibility mode for IE11 to resolve an issue: Settings>Compatibility View Settings>Add your site name or Check "Display intranet sites in Compatibility View" if your portal is in the intranet.
IE version 11.0.9600.16521
Worked for us, hope this helps someone.
Best way to solve this until a fix is available (if a fix comes) is to force IE compatibility mode on the user.
Use <META http-equiv="X-UA-Compatible" content="IE=9">
ideally in the masterpage so all pages in your site get the workaround.
Add the code snippet in JS file used in master page or used globally.
<script language="javascript">
if (typeof browseris !== 'undefined') {
browseris.ie = false;
}
</script>
For more information refer blog: http://blogs2share.blogspot.in/2016/11/object-doesnt-support-property-or.html
What fixed this for me was that I had a React component being rendered prior to my core.js shim being loaded.
import ReactComponent from '.'
import 'core-js/es6'
Loading the core-js prior to the ReactComponent fixed my issue
import 'core-js/es6'
import ReactComponent from '.'
This unfortunately breaks other things. Here is the fix I found on another site that seemed to work for me:
I'd say leave the X-UA-Compatible
as "IE=8"
and add the following code to the bottom of your master page:
<script language="javascript">
/* IE11 Fix for SP2010 */
if (typeof(UserAgentInfo) != 'undefined' && !window.addEventListener)
{
UserAgentInfo.strBrowser=1;
}
</script>
This fixes a bug in core.js
which incorrectly calculates that sets UserAgentInfo.strBrowse=3
for IE11 and thus supporting addEventListener
. I'm not entirely sure on the details other than that but the combination of keeping IE=8 and using this script is working for me. Fingers crossed until I find the next IE11/SharePoint "bug"!
I face the similar issue and surprisingly meta tag didn't work this time. Turns out the company I currently cooperate with has this enterprise mode setting which has priority over meta tag.
We can't change the setting cause policy issue. Luckily I don't really need any fancy features but basic usage of jQuery so my final solution is to switch its version to 1.12 for better compatibility.
ref: jQuery - Browser support