proposals icon indicating copy to clipboard operation
proposals copied to clipboard

Iframe Initialization Data Attributes

Open blittle opened this issue 3 months ago • 0 comments

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"

Read the complete Explainer.

Feedback (Choose One)

Please provide all feedback below.

I welcome feedback in this thread, but encourage you to file bugs against the Explainer.

blittle avatar Sep 30 '25 15:09 blittle