/// <summary>
        /// Returns the document element with the specified ID value.
        /// </summary>
        public CefDomNode GetElementById(string id)
        {
            fixed(char *id_str = id)
            {
                var n_id = new cef_string_t(id_str, id.Length);

                return(CefDomNode.FromNativeOrNull(
                           cef_domdocument_t.get_element_by_id(_self, &n_id)
                           ));
            }
        }
Пример #2
0
        private void on_focused_node_changed(cef_render_process_handler_t *self, cef_browser_t *browser, cef_frame_t *frame, cef_domnode_t *node)
        {
            CheckSelf(self);

            var m_browser = CefBrowser.FromNative(browser);
            var m_frame   = CefFrame.FromNative(frame);
            var m_node    = CefDomNode.FromNativeOrNull(node);

            OnFocusedNodeChanged(m_browser, m_frame, m_node);

            if (m_node != null)
            {
                m_node.Dispose();
            }
        }
Пример #3
0
 /// <summary>
 /// Called when a new node in the the browser gets focus. The |node| value may
 /// be empty if no specific node has gained focus. The node object passed to
 /// this method represents a snapshot of the DOM at the time this method is
 /// executed. DOM objects are only valid for the scope of this method. Do not
 /// keep references to or attempt to access any DOM objects outside the scope
 /// of this method.
 /// </summary>
 protected virtual void OnFocusedNodeChanged(CefBrowser browser, CefFrame frame, CefDomNode node)
 {
 }
Пример #4
0
 /// <summary>
 /// Returns true if this object is pointing to the same handle as |that|
 /// object.
 /// </summary>
 public bool IsSame(CefDomNode that)
 {
     return(cef_domnode_t.is_same(_self, that.ToNative()) != 0);
 }