Work around IE's broken 'hasAttribute'
Review Request #183 — Created Dec. 6, 2007 and submitted
|Review Board SVN (deprecated)|
Internet Explorer silently fails all calls to <node>.hasAttribute, which causes Review Board's line-comment system to fail. A decent workaround is to use getAttribute instead, as that will return either null or "" when the attribute doesn't exist (depending on the DOM implementation), which are both boolean-false. This fix was suggested by Mark Dewing in issue 261.
I verified that comments work on the following platforms: RHEL5, Firefox 188.8.131.52 WinXP, Firefox 184.108.40.206 WinXP, Internet Explorer 6.0 SP2 Vista, Internet Explorer 7.0