removed typeof comparison and updated the inline documentation
added a footnote about the attachEvent compatibility problem
updated the content