I was trying to create an iframe element using javascript, like so:
var iframe = document.createElement(\'iframe\'); iframe.setAttribute(\'name\', \'frame_x\
To continue @scunliffe’s answer, if using Prototype.js:
var iframe = Element('iframe', {name: 'frame_x'});
which works because this helper function detects HAS_EXTENDED_CREATE_ELEMENT_SYNTAX for IE, working around the .name = … bug.
HAS_EXTENDED_CREATE_ELEMENT_SYNTAX
.name = …