Other rounds: [One|Two|Three|Four|Five]
We're adding a new post type here, called "Bug or Feature?". It highlights a particular behavior in one or more browsers, that, well, could be a Bug, or it could be a Feature... we'll open up the comments for your vote and opinion.
Ok, so what is the "Bug or Feature" for today? - Glad you asked.
In IE, if you ask for the .innerHTML of an element, you will get a 'DOM' fragment representing the inner HTML content (and every other browser will do the same). However there is a catch.
If I have the following HTML, I would expect it to return the same content:
Example HTML snippet:
<input type="text" name="yourname" value="first last" size="25"/>
Expected [div].innerHTML returned:
<INPUT size=25 value="first last" name=yourname>
Not quite what was entered, but in IE you'll get your tags in UPPERCASE, attributes with no spaces returned with no quotes, no "type" attribute if its a text field and no self closing tag "/" (slash).
If the user typed "Joe Bloggs" into the field after the page loaded, and you asked for the .innerHTML, (unlike other browsers) IE returns:
<INPUT size=25 value="Joe Bloggs" name=yourname>
Try it yourself.
Is this a Bug? Or a Feature?
Vote "Bug" or "Feature", and add your thoughts.