Skip to main content

Bug Tracker

Side navigation

#9965 closed enhancement (invalid)

Opened August 03, 2011 06:24PM UTC

Closed August 18, 2011 08:03AM UTC

Last modified August 18, 2011 12:44PM UTC

Add $.support flag for loading XHTML content

Reported by: jaraco Owned by: jaraco
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

Since IE doesn't support loading XHTML content into a DOM (reference #8972), can we get a flag for it in $.support ?

Attachments (0)
Change History (3)

Changed August 03, 2011 11:22PM UTC by dmethvin comment:1

owner: → jaraco
status: newpending

If core jQuery doesn't need the capability itself, we don't generally add it to $.support because everyone will need to pay the fare for something very few people need. Can you be more specific about what this flag would mean and when you'd use it?

Changed August 18, 2011 08:03AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed August 18, 2011 12:44PM UTC by anonymous comment:3

In our application, we use it in the .js code to determine which endpoint to use when loading content into the browser. Currently, we just test for IE:

our_handler = function() {
  // here we can use $.get on our XHTML endpoint
}

if($.browser.msie) {
  our_handler = function() {
    // here we must use a different, more convoluted technique, and load
    // the HTML-compatibility endpoint.
  }
}

My thought was that a flag in support would serve two purposes: first, it would forward-proof the code in that future versions of IE might support loading XHTML content into a DOM. Second, it would document in a somewhat official way which browsers support this behavior. It provides an official place in the documentation to reference the limitations of certain browsers. The existence of this flag alone would be an indicator to IE developers that there's a capability not supported by IE that is supported by other browsers.

I'm definitely not adamant about this feature request. I just noticed that there was a $.support feature and this seemed like another appropriate application of it. Using a flag like $.support.can_get_XHTML or $.support.DOM_from_XHTML communicates better the decision being made, whereas in the status quo, the developer has to better document the reasons for selecting on $.browser.msie.