Index: lib/child/commands.js |
=================================================================== |
--- a/lib/child/commands.js |
+++ b/lib/child/commands.js |
@@ -62,24 +62,30 @@ function serializeNode(node) |
}; |
break; |
} |
return result; |
} |
function serializeSelected(message) |
{ |
+ if (!state.selectedElement) |
+ return; |
+ |
messageManager.sendAsyncMessage("ElemHideHelper:Response", { |
messageId: message.data.messageId, |
serialized: serializeNode(state.selectedElement) |
}); |
} |
function getHTML(message) |
{ |
+ if (!state.selectedElement) |
+ return; |
+ |
messageManager.sendAsyncMessage("ElemHideHelper:Response", { |
messageId: message.data.messageId, |
html: state.selectedElement.outerHTML, |
baseURI: state.selectedElement.baseURI |
}); |
} |
function quit() |