importNode in XML.Format serializer to prevent reports of adding the node to
the wrong DOM element. This fixes tests in Webkit-based browsers and FF3, which enforces this constraint. r=tschaub (Closes #1219) git-svn-id: http://svn.openlayers.org/trunk/openlayers@5528 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -114,6 +114,9 @@ OpenLayers.Format.XML = OpenLayers.Class(OpenLayers.Format, {
|
||||
// Add nodes to a document before serializing. Everything else
|
||||
// is serialized as is. This may need more work. See #1218 .
|
||||
var doc = document.implementation.createDocument("", "", null);
|
||||
if (doc.importNode) {
|
||||
node = doc.importNode(node, true);
|
||||
}
|
||||
doc.appendChild(node);
|
||||
data = serializer.serializeToString(doc);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user