So we'd need to wrap everything in WebKit namespace classes? For example, instead of exposing WebCore::Document directly, we'd need to wrap it in a WebDocument (or something like that) before wrapping it with a CefDocument?
Is the DOM not exposed at all by WebFrame?
class CefFrame : public CefBase
{
public:
...
// Return the document contained in this frame. Only returns
// successfully for HTML documents.
/*--cef()--*/
virtual CefRefPtr<CefDOMElement> GetDocument() =0;
};
// Class used to represent a DOM element.
/*--cef(source=library)--*/
class CefDOMElement : public CefBase
{
public:
// Return the parent element.
/*--cef()--*/
virtual CefRefPtr<CefDOMElement> GetParent() =0;
// Return the previous sibling element.
/*--cef()--*/
virtual CefRefPtr<CefDOMElement> GetPreviousSibling() =0;
// Return the next sibling element.
/*--cef()--*/
virtual CefRefPtr<CefDOMElement> GetNextSibling() =0;
// Return the tag name for this element.
/*--cef()--*/
virtual std::wstring GetTagName(); =0;
// Return the number of child elements.
/*--cef()--*/
virtual size_t GetChildCount() =0;
// Return the first child element.
/*--cef()--*/
virtual CefRefPtr<CefDOMElement> GetFirstChild() =0;
// Return the last child element.
/*--cef()--*/
virtual CefRefPtr<CefDOMElement> GetLastChild() =0;
// Create a new child element before the specified |refElement|. If
// |refElement| is empty the child element will be added at the end of the
// list.
/*--cef()--*/
virtual CefRefPtr<CefDOMElement> CreateChildBefore(const std::wstring& tagName,
CefRefPtr<CefDOMElement> refElement) =0;
// Remove an existing child element.
/*--cef()--*/
virtual CefRefPtr<CefDOMElement> RemoveChild(CefRefPtr<CefDOMElement> child) =0;
// Remove all existing child elements.
/*--cef()--*/
virtual CefRefPtr<CefDOMElement> RemoveChildren() =0;
// Return the number of existing attributes for this element.
/*--cef()--*/
virtual size_t GetAttributeCount() =0;
// Test if an attribute exists for this element.
/*--cef()--*/
virtual bool HasAttribute(const std::wstring& name); =0;
// Set the value of an attribute for this element.
/*--cef()--*/
virtual bool SetAttribute(const std::wstring& name, const std::wstring& value) =0;
// Retrieve the value of an attribute for this element.
/*--cef()--*/
virtual std::wstring GetAttribute(const std::wstring& name); =0;
// Remove an attribute from this element.
/*--cef()--*/
virtual bool RemoveAttribute(const std::wstring& name) =0;
// Remove all attributes from this element.
/*--cef()--*/
virtual bool RemoveAttributes() =0;
// Return the names of all existing attributes for this element.
/*--cef()--*/
virtual void GetAttributeNames(std::vector<std::wstring>& names) =0;
};
I take it that WebCore supports this functionality on Windows, it just hasn't bubbled up to the WebKit API (and therefore hasn't bubbled up to CEF either). Is that correct?
Return to Feature Request Forum
Users browsing this forum: No registered users and 26 guests