PostgreSQLのデバッグ方法
TLドクター
monitorEvents(window, 'message')
// or
window.addEventListener('message', console.log)
コンセプト
MDN docs
The window.postMessage() method safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.
それはかなりクール、右?
デモ
ポストメッセージ使用のHere is a demo.
デバッグ
しかし、どのように我々はこれらのメッセージをデバッグできますか?
コンソールタブで次の手順を実行します
// On Safari and Chromium-based browsers
monitorEvents(window, 'message')
// On Firefox
window.addEventListener('message', console.log)
// ^ It works in all the other browsers too
If you're testing in CodeSandbox, run the command in the Console of its detached window.
結果
セットアップの後、メッセージを受信すると、次のようになります.
それだ!
私は、あなたがより多くのためにどんなポストででもこのポストとfollow meを楽しむことを望みます.
Reference
この問題について(PostgreSQLのデバッグ方法), 我々は、より多くの情報をここで見つけました https://dev.to/arthurdenner/how-to-debug-postmessages-58p7テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol