proposals
proposals copied to clipboard
Iframe Initialization Data Attributes
Introduction
Provide secure and synchronous child iframe access to parent data attributes.
The parent opts into sharing data using new childdata-* attributes:
<iframe childdata-theme="dark" childdata-config="..."></iframe>
The child frame accesses this data synchronously via window.parent.dataset:
const theme = window.parent.dataset.theme; // "dark"
Feedback (Choose One)
Please provide all feedback below.
I welcome feedback in this thread, but encourage you to file bugs against the Explainer.