This is purely a puzzling curiosity.
I know that Opera supports IE’s advanced event model (attachEvent), but why does document.attachEvent evaluate to false in this browser?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For the same reason as
document.allhas a stealthy existence everywhere except IE: to support sites that unconditionally use it, but to avoid going down legacy IE-only codepaths on websites which check it conditionally (which often use other non-standard IE things that aren’t supported). This was introduced in 11.62, announced here; it seems noteworthy thatdetachEventandwindow.eventare also hidden.As for why Opera does this and others don’t: Opera historically supported it without hiding it, and while it was seen as desirable to remove it entirely, the legacy of Opera supporting it was too much to make that feasible, breaking code such as:
(From DevExpress.)
(From krpano.)