var serializer = new XMLSerializer( );
This line works fine in the console -- it works in Firebug. But for some reason, in Jetpack, I get "XMLSerializer is undefined."
Fortunately, I have a workaround. The workaround is:
var serializerClass = "@mozilla.org/xmlextras/xmlserializer;1";
var serializer =
var serializerInstance =
The second thing that doesn't work for me in Jetpack is writing to a document object using document.write():
jetpack.tabs.focused.contentWindow.open(); // works
var doc = jetpack.tabs.focused.contentDocument;
// This part doesn't work:
doc.write( formattedContent );
It also doesn't work if I try to do
win = jetpack.tabs.focused.contentWindow.open();
doc = win.document;
Jetpack will open() a new window in a fresh tab but won't give me a reference to the new window's document object. The window stays blank -- I can't write to it.
If anyone has a workaround to this, please let me know. It seems odd that I can't create a new page from Jetpack.