In general, for the structure of my app, I don't want to load documents from external resources. Instead, I need to manipulate it based on changes inside the model of my app. Is that possible with CEF? I know it is possible with WebKit, because I have done it in Qt and on Apple WebKit. I see there is a method CefDOMNode::setValue(string) which I have tried but which does lead to any visual effects. It is used in the DOM Access test but only on text nodes, and if I add html tags to the string these are rendered as plain text not as structured text.
Ive tried the following on a <div id="struct"> inside the loaded document:
- Code: Select all
CefRefPtr<CefDOMNode> structure = document->GetElementById("struct");
ASSERT(structure.get());
structure->SetValue("AAA <span style=\"color:red\">BBB</span> CCC");
doesn't work (has no effect). Anything else that I miss?
How can I add DOM nodes programmatically? I've seen only getter methods so far. Is this by design or have the modifiers just not added because you think there is no need for such?
Thanks!