Spartan’s new rendering engine is addressing previous IE interoperability issues

Spartan's rendering engine is addressing previous IE interoperability issues

This week we’ve received a very clear look at Microsoft’s checklist for what they intend to address with Window 10. Information about licensing, languages, countries, release time frames, a new build, and features were all revealed over the past 48 hours.

The IE team took to their blog today to add another marked checkbox. The team discusses at length about how they are addressing their interoperability gap in rendering engines from IE9 to Spartan by writing an implementation of DOM L3 XPath into the Windows 10 Web platform.

The IE team starts off by giving a brief account of the shortcomings and workarounds of previous rendering engines. “Prior to IE’s support for DOM L3 Core and native XML documents in IE9, MSXML provided any XML handling and functionality to the Web as an ActiveX object. In addition to XMLHttpRequest, MSXML supported the XPath language through its own APIs, selectSingleNode and selectNodes. For applications based on and XML documents originating from MSXML, this works just fine. However, this doesn’t follow the W3C standards for interacting with XML documents or exposing XPath.”

Typically speaking, sites and libraries accommodate most modern browsers by wrapping XPath calls to switch to the right implementation. IE, however, checks for an IE-specific code to use MSXML in order to make the switch in a non-interoperable way:

123456789101112131415161718192021
// code for IE
if (window.ActiveXObject || xhttp.responseType == “msxml-document”) {
xml.setProperty(“SelectionLanguage”, “XPath”);
nodes = xml.selectNodes(path);
for (i = 0; i < nodes.length; i++) {
document.write(nodes[i].childNodes[0].nodeValue);
document.write(“
“);
}
}
 
// code for Chrome, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument) {
var nodes = xml.evaluate(path, xml, null, XPathResult.ANY_TYPE, null);
var result = nodes.iterateNext();
 
while (result) {
document.write(result.childNodes[0].nodeValue);
document.write(“
“);
result = nodes.iterateNext();
}
}

Since the new rendering engine is designed to execute modern Web content, the IE team realized they would need a plugin-free, native implementation of XPath at some point.

Spartan's rendering engine is addressing previous IE interoperability issues

The before and after implementation of DOM L3 XPath. Notice the pricing.

With some testing, the team found a combination of support for the DOM L3 XPath interface, along with open sourced wicked-good-xpath (WGX), they could create a rendering engine that was ready to tackle 100% of the modern web.

If all goes well, the Spartan browser should be able to render most if not all websites and pages the way they’re supposed to be displayed. Hopefully, we can all move past the “It looks weird in IE” days.

Share This
Further reading: , , , , , , ,