code: function isEditingHost(node) {
          var parent;
          return node && node.nodeType == 1 &&
              (( (parent = node.parentNode) && parent.nodeType == 9 && parent.designMode == "on") ||
              (isEditableElement(node) && !isEditableElement(node.parentNode)));
      }
docs: The spec says "An editing host is a node that is either an Element with a contenteditable attribute set to the true state, or the Element child of a Document whose designMode is enabled."  Because Safari returns "true" for the contentEditable property of an element that actually inherits its editability from its parent, we use a different definition:  "An editing host is a node that is either an Element with a contenteditable attribute set to the true state but whose parent node is not an element or has a contenteditable attribute set to a value other than the true state, or the Element child of a Document whose designMode is enabled."