Skip to content

[FEATURE] allow embedding in an iframe#378

Merged
maurerle merged 1 commit into
freifunk:mainfrom
freifunkstuff:feature/embedded-iframe
May 22, 2026
Merged

[FEATURE] allow embedding in an iframe#378
maurerle merged 1 commit into
freifunk:mainfrom
freifunkstuff:feature/embedded-iframe

Conversation

@micw
Copy link
Copy Markdown
Contributor

@micw micw commented May 20, 2026

[FEATURE] allow embedding in an iframe (including cross-domain) by using postmessage

Description

This patch adds "postmessage" to provide the hash to the outer IFrame, so that navigation + deep linking works cross-domain

Motivation and Context

We embedd the map in our homepage. The map uses a different domain: https://freifunk-leipzig.de/map/

How Has This Been Tested?

Firefox. Also tested by our users in the last few years ;-)

Screenshots/links:

Checklist:

  • My code follows the code style of this project. (CI will test it anyway and also needs approval)
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly (added an example page and embedded/README.md)

…ing postmessage

Signed-off-by: Michael Wyraz <michael@wyraz.de>
@github-actions
Copy link
Copy Markdown
Contributor

Preview deployed: https://freifunk.github.io/meshviewer/pr-preview/pr-378/

Updated for commit a7f8551.

github-actions Bot pushed a commit that referenced this pull request May 20, 2026
@micw
Copy link
Copy Markdown
Contributor Author

micw commented May 20, 2026

Demo: https://freifunk.github.io/meshviewer/pr-preview/pr-378/embed/

Testing:

  1. select a node (or something else)
  2. expected: the hash is propagated to the iframe
  3. open an iframe with a hash
  4. expected: the hash is propagated to the map

@maurerle maurerle merged commit 98749eb into freifunk:main May 22, 2026
3 checks passed
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.

2 participants