Re: "Object does not support property or method attachEvent" on IE 7,8,9,10

2,764 views
Skip to first unread message

Jens

unread,
Dec 21, 2013, 9:35:00 AM12/21/13
to google-we...@googlegroups.com
Do you have Chrome Frame installed in your IE? Or does your IE use a custom User Agent string?

This error basically means GWT is using code that only works in (older) IE's (attachEvent) but the browser you are using is not IE (or its IE 11, but in that case GWT should choose the Gecko/FireFox permutation which does not use attachEvent)

-- J.

Jens

unread,
Dec 21, 2013, 6:07:58 PM12/21/13
to google-we...@googlegroups.com
The problem was reported by a client using IE8. We try to reproduce it using IE8 User Agent String in IE 11 development tool. In the JS console we get "Object doesn't support property or method 'attachEvent'.

By using the IE 8 user agent string you are forcing GWT to choose the IE 8 permutation which uses attachEvent(). But at the same time you have told your IE 11 to work in document mode "edge" which means it uses the newest features and HTML APIs. In "edge" mode IE 11 does not support attachEvent(). So you should try to set the document mode to IE 8 too. If thats not possible or you are still seeing the issue in IE 11 then you have to use a real IE 8 (or maybe try IE 9/10 and set them to document mode of IE 8).

If the client reports the same issue using IE 8 then your client has a misconfigured IE 8 (similar to how you misconfigured your IE 11). You can search this group for attachEvent problems and if I remember correctly most of the time an old Chrome Frame plugin was installed in IE 8 which has caused GWT to still use the IE 8 permutation although the app will be rendered by the chrome engine/plugin which does not support attachEvent().

-- J.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages