Skip to main content

Bug Tracker

Side navigation

#13478 closed bug (notabug)

Opened February 19, 2013 08:50PM UTC

Closed February 19, 2013 09:03PM UTC

IE 8 element with attribute creation failure 1.8.3 and 1.9.1

Reported by: richard_collette@hsb.com Owned by:
Priority: undecided Milestone: None
Component: core Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:
Description

I am seeing a failure to create an element when the element is not self closed, has an attribute specified, and has no closing tag. It appears to work in a majority of the browsers except IE8. Have not tested it with IE7. Since the goal of jQuery is to have consistent behavior across browsers, I would expect this to either throw an error because the element HTML is not valid, or work consistently across browsers.

Fiddle is here, but you'll probably have to save it to a file to test in IE8 since jsfiddle doesn't seem to work any longer with IE8.

http://jsfiddle.net/ucdVC/2/

Attachments (0)
Change History (1)

Changed February 19, 2013 09:03PM UTC by gibson042 comment:1

component: unfiledcore
resolution: → notabug
status: newclosed

Closing tags are only optional for single elements ''without'' attributes.

http://api.jquery.com/jQuery/#creating-new-elements:

If the HTML is more complex than a single tag without attributes, as it is in the above example, the actual creation of the elements is handled by the browser's innerHTML mechanism.
To ensure cross-platform compatibility, the snippet must be well-formed. Tags that can contain other elements should be paired with a closing tag