I have gecko-sdk1.8.0.4 in my system. I am working on a XULRunner
application.
I am trying to write an HTML editor as XPCOM component in C++. I could
create the element and add it to the DOM using the following code.
nsCOMPtr<nsIDOMElement> spElementEditor;
nsres = pDOMDocument->CreateElement(NS_LITERAL_STRING("editor"),
getter_AddRefs(spElementEditor));
if (NS_FAILED(nsres))
return NS_ERROR_FAILURE;
nsres = spElementEditor->SetAttribute(NS_LITERAL_STRING("editortype"),
NS_LITERAL_STRING("html"));
nsres = spElementEditor->SetAttribute(NS_LITERAL_STRING("src"),
NS_LITERAL_STRING("http://www.google.com"));
nsres = spElementEditor->SetAttribute(NS_LITERAL_STRING("flex"),
NS_LITERAL_STRING("1"));
nsCOMPtr<nsIDOMNode> spNode2;
nsres = spElementClientArea->AppendChild(spElementEditor,
getter_AddRefs(spNode2));
if (NS_FAILED(nsres))
eturn NS_ERROR_FAILURE;
But how can I access editor's properties like commandManager,
contentDocument, contentWindow, docShell, editingSession, editortype,
webBrowserFind, webNavigation and its methods?
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom