/// <summary> /// Returns the document element with the specified ID value. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_dom_capi.h">cef/include/capi/cef_dom_capi.h</see>. /// </remarks> public CfxDomNode GetElementById(string id) { var id_pinned = new PinnedString(id); var __retval = CfxApi.DomDocument.cfx_domdocument_get_element_by_id(NativePtr, id_pinned.Obj.PinnedPtr, id_pinned.Length); id_pinned.Obj.Free(); return(CfxDomNode.Wrap(__retval)); }
internal static CfxDomNode Wrap(IntPtr nativePtr) { if (nativePtr == IntPtr.Zero) { return(null); } lock (weakCache) { var wrapper = (CfxDomNode)weakCache.Get(nativePtr); if (wrapper == null) { wrapper = new CfxDomNode(nativePtr); weakCache.Add(wrapper); } else { CfxApi.cfx_release(nativePtr); } return(wrapper); } }
internal static CfxDomNode Wrap(IntPtr nativePtr) { if(nativePtr == IntPtr.Zero) return null; lock(weakCache) { var wrapper = (CfxDomNode)weakCache.Get(nativePtr); if(wrapper == null) { wrapper = new CfxDomNode(nativePtr); weakCache.Add(wrapper); } else { CfxApi.cfx_release(nativePtr); } return wrapper; } }
/// <summary> /// Returns true (1) if this object is pointing to the same handle as |that| /// object. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_dom_capi.h">cef/include/capi/cef_dom_capi.h</see>. /// </remarks> public bool IsSame(CfxDomNode that) { return 0 != CfxApi.cfx_domnode_is_same(NativePtr, CfxDomNode.Unwrap(that)); }
/// <summary> /// Returns true (1) if this object is pointing to the same handle as |that| /// object. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_dom_capi.h">cef/include/capi/cef_dom_capi.h</see>. /// </remarks> public bool IsSame(CfxDomNode that) { return(0 != CfxApi.DomNode.cfx_domnode_is_same(NativePtr, CfxDomNode.Unwrap(that))); }