Bug Tracker

Ticket #2109 (new enhancement)

Opened 8 months ago

Last modified 4 months ago

Adding xhtml+xml capabitlity to ajax load()

Reported by: Max_B Assigned to: anonymous
Type: enhancement Priority: major
Milestone: 1.2.2 Component: ajax
Version: 1.2.1 Keywords:
Cc: Needs: Review

Description

Currently, the load() method uses the responseText from the ajax request and innerHTML. If the server send application/xhtml+xml content-type header the responseXML is returned by the ajax/get/post method but is not inserted into the DOM.

One needs to manually add it in the callback with a code like:

function (data, status) {
	if (data.documentElement) targetnode.appendChild(document.importNode(data.documentElement, true));
	else targetnode.append(data);
}

Attachments

Change History

Changed 4 months ago by flesler

document.importNode doesn't exist on IE.

Changed 4 months ago by flesler

  • owner deleted
  • component changed from core to ajax
Note: See TracTickets for help on using tickets.