Пример #1
0
void
ChromeNodeList::Remove(nsINode& aNode, ErrorResult& aError)
{
  if (!aNode.IsContent()) {
    aError.Throw(NS_ERROR_DOM_TYPE_ERR);
    return;
  }

  RemoveElement(aNode.AsContent());
}
Пример #2
0
void
ChromeNodeList::Append(nsINode& aNode, ErrorResult& aError)
{
  if (!aNode.IsContent()) {
    // nsINodeList deals with nsIContent objects only, so need to
    // filter out other nodes for now.
    aError.Throw(NS_ERROR_DOM_TYPE_ERR);
    return;
  }

  AppendElement(aNode.AsContent());
}