Add try/catch around node.ownerDocument.implementation

Fixes Firefox NS_ERROR_UNEXPECTED bug when dynamically adding and removing editors.