Пример #1
0
 virtual void Visit(CefRefPtr<CefDOMDocument> document)
 {
   // Register an click listener for the button.
   CefRefPtr<CefDOMNode> button = document->GetElementById("button");
   ASSERT(button.get());
   button->AddEventListener("click", new Listener(), false);
 }
Пример #2
0
 void RegisterClickListener(CefRefPtr<CefDOMDocument> document,
                            CefRefPtr<CefDOMEventListener> listener,
                            const std::string& elementId)
 {
   CefRefPtr<CefDOMNode> element = document->GetElementById(elementId);
   ASSERT(element.get());
   element->AddEventListener("click", listener, false);
 }