Object doesn't support property or method 'removeEventListener' RRS feed

  • Question

  • First off, I am not the developer of the webpage in question, so I have no control over the source code. One 32-bit Windows 7 workstation of about 50 just hangs (well, not actually hangs, but just gets unending Windows wait cursor - spinning circle)  on a particular web page. No, I have not tested all 50 stations; however, I have tested on three or four, including both 64-bit & 32-bit Windows 7 Pro, and only one station has this problem. F12 reveals that an error occurs here:

    window.removeEventListener('message', checkMessage);

    The error is this:

    Object doesn't support property or method 'removeEventListener'

    I have tried the following, all with no change in behavior above:

    • Add the site to Compatibility View.
    • Logging on under different user profile.
    • Programs & Features → Turn Windows features on or off. Uncheck IE 11, reboot, re-check IE 11, reboot.
    • Update Windows. IE 11 is now at version 11.0.9600.18314, shows Update Versions 11.0.31 (KB3154070). Other computers tested are on 11.0.9600.18230; however, I believe that is only because I have not updated Windows today as I did for the one in question, and it likely had that version before its update today.


    Saturday, May 21, 2016 11:32 PM

All replies

  • Hi,

    without a reproduction url, nobody can make an accurate diagnosis...


    It is not the user Compatibility View settings. It could be Compatibility View Settings>check "Include updated website lists from Microsoft". Restart IE for the changes to take effect.

    .... the first step in troubleshooting browser issues is to test in no Addons mode. Start>Run>iexplore.exe -extoff [url]

    normally on the later versions of IE, scripting errors like window.removeEventListener('message', checkMessage); are suppressed to the user.


    tools>Internet Options>Advanced tab, uncheck "Display a notification about every script error"


    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to raise a question, it's highly recommended you head on over to


    Sunday, May 22, 2016 11:52 PM
    • Sorry...could have posted the URL at the outset. I just figured this might be a well-known issue and that would be unnecessary. The problematic URL is this:
    • Testing, I hit F12, then open the page (or just uncheck "Disabled script debugging" first). Halt is on line 96, where it encounters the .removeEventListener. Outside debug, this throws it into an infinite loop. Inside debug, it keeps returning to this line when I attempt to step through.
    • I forgot to list the fact that I had already run IE without add-ons. Still no go.
    • "Disable script debugging (Internet Explorer)" & "Disable script debugging (Other)" have been checked from the outset, except for testing.
    • "Display a notification about every script error" has been unchecked from the outset, except for testing.
    • I am not the end user. I am the IT support for the end user who is having this problem with a new computer that I helped set up.
    • Unchecked Compatibility View Settings → "Use Microsoft compatibility lists" and restarted IE. No change.
    • Already tried with & without popup blocker enabled.
    Monday, May 23, 2016 11:26 AM
  • Well, at long last, I have one clue. More fiddling inside the debugger, and I found that Document Mode is 7 (Default) on the affected machine. Since it is the default, that mode is in effect for any site; this one just happens to be one with a method that did not exist in version 7.

    If I open any site on my own computer, I see that (Default) Document mode is Edge. If I change it to 7, then open the affected page, I get the same error on my computer. On the affected machine, I manually switched from 7 to Edge and then opened the site--with no problem. Further testing reveals that I have to select at least Document mode 9 for this page to work. So that matches other posts that, in my extremely limited understanding of jscript (just what I have discovered in researching this issue), seem to indicate that this particular method did not arrive until version 9.

    But...when I close IE and re-open it, the error returns. And when I simply open to Google (home page) and check Document mode, it also indicates 7, which makes sense, since that is the default. On other stations, though, default is Edge.  This is something at the machine level, or at least is in the default user profile, since it crosses user profile boundaries.

    So now, I believe the entire question comes down to why the default document mode is 7 on this computer and how to change that to a more recent version.

    Monday, May 23, 2016 11:44 AM
  • Hi Brian D. Hart,
    According to your description, I suggest that we could try these steps to check.

    1. Click the Close button to close the error message. Find Internet Explorer Tools. Choose Compatibility View Settings. Add URL of site, accept changes and Close. Refresh the page and try to open the site now.

    2. If the issue is still existing, you can try to change the settings in Internet Explorer and check.
    Open Internet Explorer, click on Tools. Click on Internet Options, click Advanced tab. Make sure there is a check mark for these options:
    o Disable script debugging (Internet Explorer)
    o Disable script debugging (Other)
    Uncheck Display notification about every script error. Click Apply and OK. Restart the Internet Explorer and check the issue.

    3. Try to disable enhanced protected mode and check.
    Click the Tools icon in Internet Explorer. Go to Internet Options, click Advanced tab and select the Security section and uncheck the check box beside Enable Enhanced Protected Mode (requires restarting Internet Explorer). Click on Apply and then click OK.

    4. Also try to add the websites to trusted sites list and check.
    Open Internet Explorer, click on Tools and then click on Internet Options. Click on the Security tab. Now click on Trusted sites and then click on sites button. Type the URL of the website in the text box and click on the Add button. When you’re done, click on Close.

    Hope it will be helpful to you.

    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact

    Monday, May 23, 2016 11:49 AM
  • Next stop: When I open Google, then press F12, I see document mode go to Edge briefly, then change to 7. If I change to Edge, all is fine--until I close & re-open.

    I do see a message a the bottom of the debugger when on Google: "The attached page targets document mode 7...", but I have no way of knowing if that is even relevant. But on my own computer, there is no switch from Edge to 7 when I open the debugger on Google.

    I have already done multiple resets of Advanced & all IE settings, as well as unchecking both "Display intranet sites..." and "Use Microsoft compatibility lists" in Compatibility View, with no effect, as well as Connections → LAN Settings → Automatically detect settings, so I think this rules out any confusion regarding intranet/internet zones.

    Monday, May 23, 2016 11:54 AM
  • Carl,

    I had already been through most of those steps. I did try disabling protected mode, to no effect. I also tried adding the site to trusted sites, to no effect.

    But note that even at Google, unlike on other computers, document mode shows 7. So I am convinced that something on this computer has IE stuck in document mode 7 as the default.

    How do I change the default?

    Monday, May 23, 2016 12:00 PM
  • And I have already checked the registry settings under both HKCU & HKLM: Software\Microsoft\Internet Explorer\Browser Emulation and a few others. With a few minor variances, none of which would seem to relate to Compatibility Mode, these matched the settings on other computers that do not have the problem. Even after resetting these and rebooting, though, the problem remains: IE 11 seems to be stuck in Document Mode 7, even on Google.

    I got excited when I found HKLM\SOFTWARE\Microsoft\Internet Explorer\UnattendBackup\AllSitesCompatibiityMode but, alas, the value is already 0, and even changing that and restarting IE made no difference.

    So the question still comes down to why one computer would show Edge as the default but the problematic computers shows 7 as default--both even while on Google.

    Monday, May 23, 2016 12:39 PM
  • One more clue:

    I just followed a link to here: where I see that the user agent is this:

    Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC; .NET4.0C; .NET4.0E)

    Unlike this, my own computer shows this:

    Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

    OK, so I think that tells me there is a useragent issue, but this is still somewhat over my head. How do I fix it to match what I see on other computers not having the issue?

    Also interesting: when I use another computer and just enable Compatibility View for a site, the User Agent string becomes this:

    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)

    Now, that configuration fails when attempting to access the site that uncovered all of this bad behavior on the part of the OS/browser. However, note that manually setting compatibility mode on another station results in User Agent string beginning with Mozilla/4.0 compatible MSIE7.0, unlike the problematic computer that seems to be stuck at Mozilla 5.0 compatible MSIE7.0.

    Now, if I could just figure out what, exactly, is sending the errant compatibility view User Agent string, I think perhaps I might have my answer. I could not find it in the registry, AppData files, or .ini.

    Monday, May 23, 2016 1:38 PM
  • Hi Brian D. Hart,

    Thank you for sharing it here, it will be helpful to other community members who have same questions. Also please check the link below about userAgent String change

    Hope it will be helpful to you.

    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact

    Thursday, May 26, 2016 8:13 AM
  • I checked that site, and while it has some of the same questions I do, it does not ever quite get around to answering the core question: exactly where does IE11 gets is UA string? Or, perhaps, why would IE11 be sending a UA with IE7 & compatibility flag when it is not in compatibility view, not checking the MS compatibility site list, and none of the relevant registry entries account for it?

    I assume this must be related to some version of a DLL or other file in the system or something is buried in an INI file somewhere. In addition to checking the GUI compatibility-related settings and trying them in different combinations, I have been through the registry fairly (I think) exhaustively, noting that none of the registry keys are set that would show all sites in compatibility mode or use compatibility mode at all, for that matter.

    Thursday, May 26, 2016 4:54 PM