Skip to content

fix: only handle postMessage events from the embed's own iframe - #67

Open
StykMartin wants to merge 1 commit into
marcveens:mainfrom
StykMartin:wip/mstyk/filter-message-by-source
Open

fix: only handle postMessage events from the embed's own iframe#67
StykMartin wants to merge 1 commit into
marcveens:mainfrom
StykMartin:wip/mstyk/filter-message-by-source

Conversation

@StykMartin

Copy link
Copy Markdown

Closes: #66

Closes: marcveens#66
Signed-off-by: Martin Styk <mart.styk@gmail.com>
Copilot AI review requested due to automatic review settings May 29, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR tightens postMessage handling in the Draw.io embed by ensuring the component only processes messages originating from the embedded iframe window.

Changes:

  • Added a MessageEvent.source guard to ignore messages not sent by the embed iframe.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/DrawIoEmbed.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple <DrawIoEmbed> on one page interfere with each other

2 participants