www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 88edc08e78d703151405d43ac181b16d62d54237
parent 4aa81bd39f43d0c3e3056f3209c870ea3cb1d31a
Author: Simon Kornblith <simon@simonster.com>
Date:   Fri, 17 Feb 2012 14:43:48 -0500

Expose XMLSerializer to translators

Diffstat:
Mchrome/content/zotero/xpcom/translation/translate_firefox.js | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -75,9 +75,16 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) { } else { this.parseFromString = function(str, contentType) _DOMParser.parseFromString(str, contentType); } - } + }; this.sandbox.DOMParser.__exposedProps__ = {"prototype":"r"}; this.sandbox.DOMParser.prototype = {}; + this.sandbox.XMLSerializer = function() { + var s = Components.classes["@mozilla.org/xmlextras/xmlserializer;1"] + .createInstance(Components.interfaces.nsIDOMSerializer); + this.serializeToString = function(doc) { + return s.serializeToString(doc.__wrappedDOMObject ? doc.__wrappedDOMObject : doc); + }; + }; } /**