rendered paste body(addon-sdk-1.0b5)john@john-desktop:/e/scripts/xul/testing$ cat lib/main.js var contextMenu = require("context-menu");var request = require("request");var selection = require("selection");pageMod = require("page-mod").PageMod({ include: ["*.org"], contentScriptWhen: 'start', contentScript: 'window.stop();window.document.body.write("I like cheese");'});exports.main = function(options, callbacks) { console.log(options.loadReason); var menuItem = contextMenu.Item({ label: "Translate Selection", context: contextMenu.SelectionContext(), contentScript: 'self.on("click", function () {' + ' var text = window.getSelection().toString();' + ' self.postMessage(text);' + '});', onMessage: function (text) { if (text.length == 0) { throw ("Text to translate must not be empty"); } console.log("input: " + text) var req = request.Request({ url: "http://ajax.googleapis.com/ajax/services/language/translate", content: { v: "1.0", q: text, langpair: "|en" }, onComplete: function (response) { translated = response.json.responseData.translatedText; console.log("output: " + translated) selection.text = translated; } }); req.get(); } });}; exports.onUnload = function (reason) { console.log(reason);};(addon-sdk-1.0b5)john@john-desktop:/e/scripts/xul/testing$ cfx runUsing binary at '/usr/bin/firefox'.Using profile at '/tmp/tmpq7ByJQ.mozrunner'.info: startuperror: An exception occurred.Traceback (most recent call last): File "javascript:window.stop();window.document.body.write("I like cheese");", line 1, in TypeError: window.document.body is null