Bug Tracker

Ticket #9965 (closed enhancement: invalid)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

Description

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

Change History

comment:1 Changed 3 years ago by dmethvin

  • Owner set to jaraco
  • Status changed from new to pending

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?

comment:2 Changed 3 years ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

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!

comment:3 Changed 3 years ago by anonymous

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.

Note: See TracTickets for help on using tickets.