A
Aaron Gray
Here's a big issue, does IE8 support 'this' properly on events now ?
It certainly confuses things if it does !
Aaron
It certainly confuses things if it does !
Aaron
Aaron said:Here's a big issue, does IE8 support 'this' properly on events now ?
It certainly confuses things if it does !
Thomas 'PointedEars' Lahn said:Support by beta versions or lack thereof is never a big issue.
IE 8 is certainly irrelevant at this point. If you are interested in it
without having to update, there is IETester.
Here's a big issue, does IE8 support 'this' properly on events now ?
It certainly confuses things if it does !
The inference here is that IE's setting of the value of a listener's
this keyword (presumably added using attachEvent) is not proper (or
wrong), however, there is limited circumstantial evidence to support
that assertion.
IE's behaviour in this regard is inconsistent with its behaviour for
listeners assigned to an element's on<event> property directly,
however its behaviour is consistent with in-line listeners as
implemented by all browsers (as far as I know).
The logical way for IE to support the W3C event model is to implement
addEventListener according to the W3C DOM 3 specification and leave
attachEvent as it is (though I think the chance of that happening is
very small).
dhtml said:the thisArg in a legacy event is the object the event was attached to
in all browsers:
document.body.onclick = function() { alert(this.tagName); };
alert "BODY"
This isn't true for attribute on body in Firefox, due to a bug.
<body onclick="alert(this === windopw)">
FF: alert "true", same as window.onclick in FF
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.