1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-06 19:25:45 +01:00

Death to E4X and stuff. Also fix some bugs.

This commit is contained in:
Kris Maglione
2012-11-30 19:12:51 -08:00
parent 0c4a25ca86
commit 81b41176b6
12 changed files with 45 additions and 30 deletions

View File

@@ -1643,6 +1643,14 @@ var DOM = Class("DOM", {
}
}),
toXML: function toXML(xml) {
// Meh. For now.
let doc = services.XMLDocument();
let node = this.fromJSON(xml, doc);
return services.XMLSerializer()
.serializeToString(node);
},
parseNamespace: function parseNamespace(name) {
var m = /^(?:(.*):)?(.*)$/.exec(name);
return [DOM.fromJSON.namespaces[m[1]], m[2]];