Site Navigation

Friday, August 24, 2007

bug 268 - hasAttributes not supported in IE

Issue: #268
Affects: IE5, IE5.5, IE6, IE7, IE8 Beta 1, IE8 Beta 2
Fixed In: IE8 RC 1

Example:
<script type="text/javascript">
var foo = document.getElementById( 'content' );
alert( foo.hasAttributes() );
</script>



Known Workarounds: Yes.
Example Workaround Code:
<script type="text/javascript">
var foo = document.getElementById( 'content' );
alert( (foo.attributes.length > 0) );
</script>



Related Issues: None.