throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,
throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR,
  public Node appendChild(Node newChild)  {    try      {        DomNode	child = (DomNode) newChild;        if (child.nodeType == DOCUMENT_FRAGMENT_NODE)          {            // Append all nodes in the fragment to this node            for (DomNode ctx = child.first; ctx != null; ctx = ctx.next)              {                checkMisc(ctx);              }            for (DomNode ctx = child.first; ctx != null; )              {                DomNode ctxNext = ctx.next;                appendChild(ctx);                ctx = ctxNext;              }          }        else          {            checkMisc(child);            if (child.parent != null)              {                child.parent.removeChild(child);              }            child.parent = this;            child.index = length++;            child.setDepth(depth + 1);            child.next = null;            if (last == null)              {                first = child;                child.previous = null;              }            else              {                last.next = child;                child.previous = last;              }            last = child;            if (reportMutations)              {                insertionEvent(null, child);              }          }        return child;      }    catch (ClassCastException e)      {        throw new DomEx(DomEx.WRONG_DOCUMENT_ERR,                        null, newChild, 0);    }  }