Wednesday, February 24, 2010

Possible bugs in Mozilla Jetpack?

I've noticed a couple of things that don't work in Mozilla Jetpack. One is:

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 = ";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():; // works
var doc = jetpack.tabs.focused.contentDocument;
// This part doesn't work: );
doc.write( formattedContent );
doc.close( );

It also doesn't work if I try to do
  win =;
doc = win.document; );
// etc.

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.