pub trait ICoreWebView2DevToolsProtocolEventReceiver: IUnknown {
// Required methods
unsafe fn add_dev_tools_protocol_event_received(
&self,
handler: *mut *mut ICoreWebView2DevToolsProtocolEventReceivedEventHandlerVTable,
token: *mut EventRegistrationToken,
) -> HRESULT;
unsafe fn remove_dev_tools_protocol_event_received(
&self,
token: EventRegistrationToken,
) -> HRESULT;
}
Expand description
A Receiver is created for a particular DevTools Protocol event and allows
you to subscribe and unsubscribe from that event. Obtained from the
WebView object using GetDevToolsProtocolEventReceiver
.
Required Methods§
Sourceunsafe fn add_dev_tools_protocol_event_received(
&self,
handler: *mut *mut ICoreWebView2DevToolsProtocolEventReceivedEventHandlerVTable,
token: *mut EventRegistrationToken,
) -> HRESULT
unsafe fn add_dev_tools_protocol_event_received( &self, handler: *mut *mut ICoreWebView2DevToolsProtocolEventReceivedEventHandlerVTable, token: *mut EventRegistrationToken, ) -> HRESULT
Subscribe to a DevToolsProtocol
event. The Invoke
method of the
handler
runs whenever the corresponding DevToolsProtocol
event runs.
Invoke
runs with an event args object containing the parameter object
of the DevTools Protocol event as a JSON string.
\snippet ScriptComponent.cpp DevToolsProtocolEventReceived
Sourceunsafe fn remove_dev_tools_protocol_event_received(
&self,
token: EventRegistrationToken,
) -> HRESULT
unsafe fn remove_dev_tools_protocol_event_received( &self, token: EventRegistrationToken, ) -> HRESULT
Remove an event handler previously added with
add_DevToolsProtocolEventReceived
.
Trait Implementations§
Source§impl ComInterface for dyn ICoreWebView2DevToolsProtocolEventReceiver
impl ComInterface for dyn ICoreWebView2DevToolsProtocolEventReceiver
Source§const IID: IID = IID_ICORE_WEB_VIEW2_DEV_TOOLS_PROTOCOL_EVENT_RECEIVER
const IID: IID = IID_ICORE_WEB_VIEW2_DEV_TOOLS_PROTOCOL_EVENT_RECEIVER
The associated id for this interface
Source§type VTable = ICoreWebView2DevToolsProtocolEventReceiverVTable
type VTable = ICoreWebView2DevToolsProtocolEventReceiverVTable
A COM compatible V-Table
Source§fn is_iid_in_inheritance_chain(riid: &GUID) -> bool
fn is_iid_in_inheritance_chain(riid: &GUID) -> bool
Check whether a given IID is in the inheritance hierarchy of this interface