Skip to content

Instantly share code, notes, and snippets.

@liamzebedee
Created February 9, 2013 04:39
Show Gist options
  • Save liamzebedee/4743859 to your computer and use it in GitHub Desktop.
Save liamzebedee/4743859 to your computer and use it in GitHub Desktop.
// Now delve down in to the message to get the HTML representation of the selection
nsCOMPtr<nsIDocShell> rootDocShell;
rv = aMsgWindow->GetRootDocShell(getter_AddRefs(rootDocShell));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocShellTreeNode> rootDocShellAsNode(do_QueryInterface(rootDocShell, &rv));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocShellTreeItem> childAsItem;
rv = rootDocShellAsNode->FindChildWithName(NS_LITERAL_STRING("messagepane").get(),
true, false, nullptr, nullptr, getter_AddRefs(childAsItem));
NS_ENSURE_SUCCESS(rv, rv);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment