WebView2 日本語リファレンス
WebView2インターフェース › ICoreWebView2NotificationReceivedEventArgs

ICoreWebView2NotificationReceivedEventArgs

COM
IID1512dd5b-5514-4f85-886e-21c3a4c9cfe6継承元IUnknown自前メソッド開始 vtbl3

メソッド 5

vtbl = vtable インデックス(0始まり)。HSP等からインデックス指定でCOMメソッドを呼ぶ際に使用します。0〜2 は IUnknown。

vtbl 3 HRESULT get_SenderOrigin(LPWSTR* value)
valueLPWSTR*out通知を送信したページのオリジンを受け取る。呼び出し側は CoTaskMemFree で解放する必要がある。
vtbl 4 HRESULT get_Notification(ICoreWebView2Notification** value)
valueICoreWebView2Notification**out受信した通知の内容を保持するオブジェクト (ICoreWebView2Notification) を受け取る。
vtbl 5 HRESULT put_Handled(BOOL value)
valueBOOLin通知をアプリ側で処理済みとしてマークするかどうかを指定する。TRUE の場合は既定の通知表示が抑止される。
vtbl 6 HRESULT get_Handled(BOOL* value)
valueBOOL*out通知がアプリ側で処理済みとしてマークされているかどうかを受け取る。
vtbl 7 HRESULT GetDeferral(ICoreWebView2Deferral** deferral)
deferralICoreWebView2Deferral**outイベント処理を非同期に遅延させるための Deferral オブジェクト (ICoreWebView2Deferral) を受け取る。

HSP用 COM定義

#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。WebView2 のインターフェースは環境/ローダ経由で取得するため #usecom 末尾は "{}"

出力引数:
#define global IID_ICoreWebView2NotificationReceivedEventArgs "{1512DD5B-5514-4F85-886E-21C3A4C9CFE6}"
#usecom global ICoreWebView2NotificationReceivedEventArgs IID_ICoreWebView2NotificationReceivedEventArgs "{}"
#comfunc global ICoreWebView2NotificationReceivedEventArgs_get_SenderOrigin  3 var
#comfunc global ICoreWebView2NotificationReceivedEventArgs_get_Notification  4 sptr
#comfunc global ICoreWebView2NotificationReceivedEventArgs_put_Handled       5 int
#comfunc global ICoreWebView2NotificationReceivedEventArgs_get_Handled       6 var
#comfunc global ICoreWebView2NotificationReceivedEventArgs_GetDeferral       7 sptr
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。