Beispiel #1
0
NS_IMETHODIMP
HTMLObjectElement::GetContentDocument(nsIDOMDocument **aContentDocument)
{
  NS_ENSURE_ARG_POINTER(aContentDocument);

  nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(GetContentDocument());
  domDoc.forget(aContentDocument);
  return NS_OK;
}
Beispiel #2
0
nsIDOMWindow*
HTMLObjectElement::GetContentWindow()
{
  nsIDocument* doc = GetContentDocument();
  if (doc) {
    return doc->GetWindow();
  }

  return nullptr;
}
nsPIDOMWindowOuter*
HTMLObjectElement::GetContentWindow(nsIPrincipal& aSubjectPrincipal)
{
  nsIDocument* doc = GetContentDocument(aSubjectPrincipal);
  if (doc) {
    return doc->GetWindow();
  }

  return nullptr;
}
NS_IMETHODIMP
nsHTMLIFrameElement::GetSVGDocument(nsIDOMDocument **aResult)
{
  return GetContentDocument(aResult);
}