Hi there,
I am working on a cross-platform desktop application where we have
embedded browser window to display some presentation data. Now I am
looking for a way to modify/replace currently displayed DOM document.
Let me explain what I am trying to achieve:
Here we are getting the nsIDOMDocument interface:
// get dom document from web nav
nsCOMPtr<nsIDOMDocument> domDocument;
nsresult rv = m_ptrs->m_web_navigation->GetDocument(
getter_AddRefs(domDocument) );
if (NS_FAILED(rv)) return false;
if (!domDocument) return false;
Then we are modifying its children using methods provided:
createElement, createTextNode, then appendChild of base nsIDOMNode
interface and so.
But the changes are not visible in the Browser Window! If I say try to
save my DOM document to string using nsIDocumentEncoder's EncodeToString
method there will be no any changes in the code. Just the same document
that have been loaded previously.
Is it possible to apply the changes to a DOM document?
Also, is it possible to construct a new nsIDOMDocument using nsIDOMNode
methods and set it as the main document of a browser window? (For
immediate displaying)
Thanks for any help!
Ilya
_______________________________________________
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding