Skip to main content
100%

iFrame

✓ Published0🌍 Public
MMax Barrass
Last edited May 23, 2024
Created on May 23, 2024
Forked from HTML Starter

This example demonstrates bidirectional communication between an embedded iframe and its parent page using the HTML5 `postMessage` API and the `window.addEventListener('message')` event. It shows how a child document can display messages sent from the parent, and how a user can type text into an input field and send it back to the parent via `window.parent.postMessage`. The page is a minimal HTML document with inline CSS styling and vanilla JavaScript, requiring no external libraries or frameworks. It serves as a bare-bones template for cross-origin messaging patterns in web visualization contexts.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes