clientside/amplesdk — Issue #125: XMLSerializer, serializeToString, and IE9
Author: ilinsky
Created: 2012-02-15 17:20:04+00:00
State: open
Labels: b-ie, m-runtime

From http://groups.google.com/group/amplesdk/browse_thread/thread/5a8c375f01d248d4

We often use an instance of the XMLSerializer and its
serializeToString method to POST a modified record back to the server.
This has worked fine across all browsers.

IE9 has an XMLSerializer object but it does not implement the
serializeToString method. Neverthless, this should be no problem
because XMLSerializer.js simply *replaces* the native implementation
by exporting it to the window object.

Testing in IE9 reveals that serializeToString will fail with a message
"No such interface supported" which looks like the IE9 message, not an
Ample message. I suspect that the native IE9 XMLSerializer is not
being replaced for some reason.

I have a workaround for now:
oXS = new XMLSerializer();
sRecordString = oRec.xml || oXS.serializeToString(oRec);

Curiously, I also noticed that if the XML node originated in the IE9
test page (embedded XML data in a script type="text/xml")
serializeToString() works ok; If the XML is loaded via Ajax,
serializeToString() fails.

Can IE9 really ignore an export?