title: window.postMessage VS window.chrome.webview.postMessage
body: <p>How is <code>window.postMessage</code> different from  <code>window.chrome.webview.postMessage</code>?</p>
  <p>I'm using it in the context of a <code>WebView2</code> (in a .NET/WPF application). We are loading a third-party webpage in WebView2. The webpage fires <code>window.postMessage</code> with certain data that we need to catch. According to the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.webmessagereceived?view=webview2-dotnet-1.0.902.49" rel="noreferrer">documentation</a>, WebView2 raises <code>WebMessageReceived</code> event when the loaded page fires <code>window.chrome.webview.postMessage</code>, which is correct. On the other hand, it doesn't seem to respect <code>window.postMessage</code> (no <code>WebMessageReceived</code> is fired).</p>
  <p>Are these two different APIs? Which one is standard (as in HTML5)? How can I catch <code>window.postMessage</code> event in my .NET application since I can't ask the third-party website to change their code to use <code>window.chrome.webview.postMessage</code>.</p>