Pass JavaScript Bridge callback data, such as device info, from your parent page into an iframe with postMessage.
This documentation provides instructions and sample code for accessing Median callback data within an iframe. For clarity, all styling classes and attributes have been omitted.
DisclaimerThis documentation provides a proof of concept for accessing Median callback data within an iframe. We advise reviewing the implementation with your security team, as your parent page, along with the callback function that sends data to the iframe, may be publicly accessible. It is strongly recommended to follow best practices to prevent any potential data leaks.
Parent page setup
To support callbacks, you need to define a deviceInfoCallback function which is invoked by the iframe and sends the data to the iframe.
<body> <div> <!-- Define the inline frame to host an iframe --> <!-- IFRAME_URL is a placeholder for the URL of your iframe --> <iframe src="IFRAME_URL" id="iframe"></iframe> </div> <script> // Define the deviceInfoCallback function that sends data to the iframe function deviceInfoCallback(deviceInfo) { const iframe = document.getElementById('iframe'); const message = { action: 'populateTextarea', deviceInfo: deviceInfo }; // Use postMessage to send data to the iframe iframe.contentWindow.postMessage(message, '*'); } </script></body>
Iframe setup
The iframe must implement a command using a custom URL protocol and be configured to listen for messages from the parent window.
<body> <div> <h1>Iframe Page</h1> <button id="runDeviceInfo">Run Device Info</button> <textarea id="deviceInfoOutput" placeholder="Device info will appear here..."></textarea> </div> <script> const button = document.getElementById('runDeviceInfo'); // Event listener for button click button.addEventListener('click', () => { // Trigger the custom URL protocol window.location.href = 'median://run/median_device_info?callback=deviceInfoCallback'; }); // Listen for messages from the parent window window.addEventListener('message', (event) => { if (event.data.action === 'populateTextarea') { // Populate the textarea with device info received from the parent window document.getElementById('deviceInfoOutput').value = JSON.stringify(event.data.deviceInfo); } }); </script></body>
Demo app
The following demo applications for iOS and Android demonstrate the behavior based on the provided code snippets above.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Median Docs","description":"Median docs: convert websites and web apps into native iOS and Android apps with App Studio, the JavaScript Bridge, and native plugins.","colors":{"primary":"#1174D3","light":"#4299ED","dark":"#1174D3"},"logo":{"light":"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/median-docs-light.svg?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=1da14bface36d3c440889b1a3b1df5f7","dark":"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/median-docs-dark.svg?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=90c7e5a9a9435eb9b015af64906bbf61","href":"/docs/overview"},"favicon":{"light":"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/favicon-black.png?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=c823e2fd7c0e26943949dd47b8e99786","dark":"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/favicon-black.png?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=c823e2fd7c0e26943949dd47b8e99786"},"background":{"color":{"light":"#FFFFFF","dark":"#0E0D08"}},"navbar":{"links":[{"icon":"handshake","href":"/docs/support","label":"Support"},{"icon":"headset","href":"https://median.co/contact?topic=general-inquiry\u0026utm_source=docs\u0026utm_medium=navbar","label":"Talk to Us"}],"primary":{"type":"button","label":"Create New App","href":"https://median.co/new"}},"footer":{"socials":{"github":"https://github.com/gonativeio"},"links":[{"header":"Legal","items":[{"label":"Online Terms","href":"https://median.co/terms"},{"label":"Privacy Policy","href":"https://median.co/privacy"}]}]},"search":{"prompt":"Search the Median docs..."},"seo":{"metatags":{"canonical":"https://docs.median.co","og:site_name":"Median Docs","og:type":"website","twitter:card":"summary_large_image"},"indexing":"navigable"},"fonts":{"family":"DM Sans"},"integrations":{"clarity":{"projectId":"xcavaibynk"},"ga4":{"measurementId":"G-JHTZNFF295"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"median-co","hasAudioNarration":false,"actualSubdomain":"median-co","customDomains":["docs.median.co"],"gitSource":{"type":"github","owner":"gonativeio","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10feec9ffae5051c41d0b7"},"feedback":{"thumbs":true,"agentFeedback":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b140d736e4c9d258537cd6a","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"Documentation","count":248},{"language":"default","tag":"Native Plugins","count":67},{"language":"default","tag":"Build \u0026 test","count":30},{"language":"default","tag":"Push notifications","count":26},{"language":"default","tag":"Native navigation","count":25},{"language":"default","tag":"Website builders","count":23},{"language":"default","tag":"Interface","count":18},{"language":"default","tag":"Native functionality","count":17},{"language":"default","tag":"Median JavaScript Bridge","count":16},{"language":"default","tag":"Authentication","count":14}],"searchSettings":{"showContentSnippets":false,"isFiltersEnabled":false,"maxResults":5,"fullPageSearch":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":true},"customCss":[{"filePath":"changelog-tags.css","content":"[data-component-part=\"update-tag\"][data-tag-kind]{display:inline-flex;align-items:center;padding:0.125rem 0.5rem;border-radius:9999px;font-size:0.75rem;line-height:1.25rem;font-weight:500;color:#1a100b;border:1px solid transparent}[data-component-part=\"update-tag\"][data-tag=\"new-feature\"]{background:#b5daff}[data-component-part=\"update-tag\"][data-tag=\"bug-fix\"]{background:#feb9ff}[data-component-part=\"update-tag\"][data-tag=\"maintenance\"]{background:#ffefb4}[data-component-part=\"update-tag\"][data-tag-kind=\"platform\"]{background:transparent;border-color:#1a100b}.dark [data-component-part=\"update-tag\"][data-tag=\"new-feature\"]{background:#4299ed}.dark [data-component-part=\"update-tag\"][data-tag=\"bug-fix\"]{background:#f567f0}.dark [data-component-part=\"update-tag\"][data-tag=\"maintenance\"]{background:#f7c406}.dark [data-component-part=\"update-tag\"][data-tag-kind=\"platform\"]{color:#f2f0ee;border-color:#f2f0ee}#changelog-filters [data-tag-kind]::before{content:\"\";display:inline-block;width:0.5rem;height:0.5rem;margin-right:0.4rem;border-radius:9999px;vertical-align:middle}#changelog-filters [data-tag=\"new-feature\"]::before{background:#4299ed}#changelog-filters [data-tag=\"bug-fix\"]::before{background:#f567f0}#changelog-filters [data-tag=\"maintenance\"]::before{background:#f7c406}#changelog-filters [data-tag-kind=\"platform\"]::before{background:transparent;box-shadow:inset 0 0 0 1.5px #1a100b}.dark #changelog-filters [data-tag-kind=\"platform\"]::before{box-shadow:inset 0 0 0 1.5px #f2f0ee}html:is([data-current-path=\"/docs/changelog\"],[data-current-path=\"/docs/changelog-archive\"]){--sidebar-width: 0px}html:is([data-current-path=\"/docs/changelog\"],[data-current-path=\"/docs/changelog-archive\"]) [data-layout-item=\"sidebar\"]{display:none}"}]}
{"page":{"pagePath":"docs/iframe-callbacks","slug":"/docs/iframe-callbacks","pageMetadata":{"title":"Accessing callbacks in an iframe","description":"Pass JavaScript Bridge callback data, such as device info, from your parent page into an iframe with postMessage.","keywords":["iframe","callbacks","JavaScript Bridge","postMessage"],"searchable":true,"href":"/docs/iframe-callbacks"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Pass JavaScript Bridge callback data, such as device info, from your parent page into an iframe with postMessage.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const AppetizeEmbed=({iosEmbedCode,androidEmbedCode,device,scale,osVersion})=>{const iosDevice=device?.ios??`iphone17promax`;const androidDevice=device?.android??`pixel9`;const iosScale=scale?.ios??63;const androidScale=scale?.android??60.5;const iosOsVersion=osVersion?.ios??`26`;const androidOsVersion=osVersion?.android??`17.0`;const buildUrl=(code,dev,sc,os)=>`https://appetize.io/embed/${code}?device=${dev}\u0026scale=${sc}\u0026orientation=portrait\u0026osVersion=${os}\u0026deviceColor=black`;const devices=[{label:`iOS`,code:iosEmbedCode,url:buildUrl(iosEmbedCode,iosDevice,iosScale,iosOsVersion)},{label:`Android`,code:androidEmbedCode,url:buildUrl(androidEmbedCode,androidDevice,androidScale,androidOsVersion)}].filter(({code})=>code);if(devices.length===0){return null}return _jsx(`div`,{className:`not-prose mint-flex mint-flex-wrap mint-justify-center mint-gap-6 mint-my-6`,children:devices.map(({label,url})=>_jsxs(`div`,{className:`mint-flex mint-flex-col mint-items-center`,children:[_jsx(`iframe`,{src:url,width:`308`,height:`640`,scrolling:`no`,title:`${label} simulator`,style:{border:0,paddingTop:`10px`,background:`transparent`,colorScheme:`normal`}}),_jsx(`span`,{className:`mint-mt-2 mint-text-sm mint-font-medium mint-text-gray-700 dark:mint-text-gray-300`,children:label})]},label))})};function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This documentation provides instructions and sample code for accessing Median callback data within an iframe. For clarity, all styling classes and attributes have been omitted.`}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Disclaimer`})}),_jsx(_components.p,{children:`This documentation provides a proof of concept for accessing Median callback data within an iframe. We advise reviewing the implementation with your security team, as your parent page, along with the callback function that sends data to the iframe, may be publicly accessible. It is strongly recommended to follow best practices to prevent any potential data leaks.`})]}),`\n`,_jsx(Heading,{level:`2`,id:`parent-page-setup`,children:`Parent page setup`}),`\n`,_jsxs(_components.p,{children:[`To support callbacks, you need to define a `,_jsx(_components.code,{children:`deviceInfoCallback`}),` function which is invoked by the iframe and sends the data to the iframe.`]}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTML`,numberOfLines:`18`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` \u003c!-- Define the inline frame to host an iframe -->`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` \u003c!-- IFRAME_URL is a placeholder for the URL of your iframe -->`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`iframe`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"IFRAME_URL\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"iframe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Define the deviceInfoCallback function that sends data to the iframe`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` deviceInfoCallback`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`deviceInfo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` iframe`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'iframe'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` message`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`action:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'populateTextarea'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`deviceInfo:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` deviceInfo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Use postMessage to send data to the iframe`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` iframe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`contentWindow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`postMessage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'*'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`iframe-setup`,children:`Iframe setup`}),`\n`,_jsx(_components.p,{children:`The iframe must implement a command using a custom URL protocol and be configured to listen for messages from the parent window.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`HTML`,numberOfLines:`26`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`26`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Iframe Page`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`h1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"runDeviceInfo\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Run Device Info`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`textarea`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"deviceInfoOutput\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` placeholder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Device info will appear here...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`textarea`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` button`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'runDeviceInfo'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Event listener for button click`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'click'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Trigger the custom URL protocol`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`href`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'median://run/median_device_info?callback=deviceInfoCallback'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Listen for messages from the parent window`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'message'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`action`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'populateTextarea'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Populate the textarea with device info received from the parent window`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` document`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getElementById`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'deviceInfoOutput'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`deviceInfo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`demo-app`,children:`Demo app`}),`\n`,_jsx(_components.p,{children:`The following demo applications for iOS and Android demonstrate the behavior based on the provided code snippets above.`}),`\n`,_jsx(_MdxComponentBoundary,{name:`AppetizeEmbed`,children:_jsx(AppetizeEmbed,{iosEmbedCode:`yuzh47ej2kaijoi22tv7vhpspy`,androidEmbedCode:`wpfovmnukly54qcbayaupk7umq`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{AppetizeEmbed,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Accessing callbacks in an iframe","description":"Pass JavaScript Bridge callback data, such as device info, from your parent page into an iframe with postMessage.","keywords":["iframe","callbacks","JavaScript Bridge","postMessage"],"searchable":true,"href":"/docs/iframe-callbacks"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[149,1432,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"Parent page setup","slug":"parent-page-setup","depth":2,"children":[]},{"title":"Iframe setup","slug":"iframe-setup","depth":2,"children":[]},{"title":"Demo app","slug":"demo-app","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/median-co/7d11e00da3e50cd7/changelog-tags.js"],"dynamicCss":".mint-my-6 {\n margin-top: 1.5rem;\n margin-bottom: 1.5rem\n}\n.mint-mt-2 {\n margin-top: 0.5rem\n}\n.mint-flex {\n display: flex\n}\n.mint-flex-col {\n flex-direction: column\n}\n.mint-flex-wrap {\n flex-wrap: wrap\n}\n.mint-items-center {\n align-items: center\n}\n.mint-justify-center {\n justify-content: center\n}\n.mint-gap-6 {\n gap: 1.5rem\n}\n.mint-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}\n.mint-font-medium {\n font-weight: 500\n}\n.mint-text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity, 1))\n}\n.dark\\:mint-text-gray-300:is(.dark *) {\n --tw-text-opacity: 1;\n color: rgb(209 213 219 / var(--tw-text-opacity, 1))\n}","subdomain":"median-co","siteName":"Median Docs","title":"Accessing callbacks in an iframe - Median Docs","relatedPagesConfig":{"enabled":true,"limit":3,"mode":"automatic"},"contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-07T14:23:14.330Z","gitLastModified":"2026-11-07T14:22:54.000Z","originalFileLocation":"docs/iframe-callbacks.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Pass JavaScript Bridge callback data, such as device info, from your parent page into an iframe with postMessage.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Median Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Accessing callbacks in an iframe - Median Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Pass JavaScript Bridge callback data, such as device info, from your parent page into an iframe with postMessage.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Median Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.median.co/docs/iframe-callbacks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://median-co.mintlify.site/_mintlify/api/og/v2?division=Median+JavaScript+Bridge\u0026amp;title=Accessing+callbacks+in+an+iframe\u0026amp;description=Pass+JavaScript+Bridge+callback+data%2C+such+as+device+info%2C+from+your+parent+page+into+an+iframe+with+postMessage.\u0026amp;theme=89e8bfd49237022defc8e4a0\u0026amp;signature=ba75414abe669e4421d0c069a1e9aa70ab0b801b077d5229ffb6010a49623a07\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Accessing callbacks in an iframe - Median Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Pass JavaScript Bridge callback data, such as device info, from your parent page into an iframe with postMessage.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://median-co.mintlify.site/_mintlify/api/og/v2?division=Median+JavaScript+Bridge\u0026amp;title=Accessing+callbacks+in+an+iframe\u0026amp;description=Pass+JavaScript+Bridge+callback+data%2C+such+as+device+info%2C+from+your+parent+page+into+an+iframe+with+postMessage.\u0026amp;theme=89e8bfd49237022defc8e4a0\u0026amp;signature=ba75414abe669e4421d0c069a1e9aa70ab0b801b077d5229ffb6010a49623a07\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/median-co/pVMifrDrx5tO42Lz/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Median Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1174D3\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.median.co/docs/iframe-callbacks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/iframe-callbacks.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.median.co/#organization\",\"name\":\"Median Docs\",\"url\":\"https://docs.median.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/median-co/GbSvThnXlp4SQ94L/images/median/median-docs-light.svg?fit=max\u0026auto=format\u0026n=GbSvThnXlp4SQ94L\u0026q=85\u0026s=1da14bface36d3c440889b1a3b1df5f7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.median.co#website\",\"name\":\"Median Docs\",\"url\":\"https://docs.median.co\",\"publisher\":{\"@id\":\"https://docs.median.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.median.co/docs/iframe-callbacks#webpage\",\"url\":\"https://docs.median.co/docs/iframe-callbacks\",\"name\":\"Accessing callbacks in an iframe\",\"description\":\"Pass JavaScript Bridge callback data, such as device info, from your parent page into an iframe with postMessage.\",\"dateModified\":\"2026-11-07T14:22:54.000Z\",\"isPartOf\":{\"@id\":\"https://docs.median.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.median.co/docs/iframe-callbacks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.median.co/docs/iframe-callbacks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Median JavaScript Bridge\",\"item\":\"https://docs.median.co/docs/javascript-bridge\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Accessing callbacks in an iframe\",\"item\":\"https://docs.median.co/docs/iframe-callbacks\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.median.co/docs/iframe-callbacks#article\",\"headline\":\"Accessing callbacks in an iframe\",\"name\":\"Accessing callbacks in an iframe\",\"description\":\"Pass JavaScript Bridge callback data, such as device info, from your parent page into an iframe with postMessage.\",\"url\":\"https://docs.median.co/docs/iframe-callbacks\",\"mainEntityOfPage\":{\"@id\":\"https://docs.median.co/docs/iframe-callbacks#webpage\"},\"dateModified\":\"2026-11-07T14:22:54.000Z\",\"keywords\":\"iframe, callbacks, JavaScript Bridge, postMessage\",\"publisher\":{\"@id\":\"https://docs.median.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.median.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Median Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Median Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/iframe-callbacks.md","siteName":"Median Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book-open","groups":[{"group":"Welcome","pages":[{"title":"Welcome to Median","href":"/docs/overview"},{"title":"App architecture","href":"/docs/architecture"},{"group":"Security \u0026 privacy","root":{"title":"Security \u0026 privacy","href":"/docs/security"},"pages":[{"title":"Reporting app abuse and content violations","href":"/docs/report"}]},{"title":"App licenses","href":"/docs/licenses"},{"title":"App updates and migration guide","href":"/docs/app-updates"},{"title":"App Studio accounts","href":"/docs/app-studio-accounts"},{"title":"Support","href":"/docs/support"},{"title":"Median MCP server","href":"/docs/mcp-server"}]},{"group":"Getting started","pages":[{"title":"Quickstart guide","href":"/docs/quickstart"},{"title":"App Studio Simulators","sidebarTitle":"Simulators","href":"/docs/simulators"},{"title":"App Store publishing","href":"/docs/app-publishing"}]},{"group":"Branding","pages":[{"title":"Branding overview","href":"/docs/branding-overview"},{"title":"App icon","href":"/docs/app-icon"},{"title":"Splash screen","href":"/docs/splash-screen"},{"title":"Theme colors","href":"/docs/theme-colors"},{"title":"Status bar","href":"/docs/status-bar"},{"title":"System navigation bar (Android)","href":"/docs/system-nav-bar"}]},{"group":"Interface","pages":[{"title":"App interface overview","href":"/docs/app-interface-overview"},{"group":"Device screen control","root":{"title":"Device screen control","href":"/docs/device-screen-control"},"pages":[{"title":"Screen brightness","href":"/docs/screen-brightness"},{"title":"Keep screen on","href":"/docs/keep-screen-on"},{"title":"Full screen","href":"/docs/full-screen"},{"title":"Screen orientation","href":"/docs/screen-orientation"}]},{"title":"Dark mode","href":"/docs/dark-mode"},{"title":"Native gestures and interactions","href":"/docs/swipe-gestures"},{"title":"Font scaling","href":"/docs/font-scaling"},{"title":"Webview zoom","href":"/docs/webview-zoom"},{"title":"New windows","href":"/docs/new-windows"},{"title":"Maximum windows","href":"/docs/maximum-windows"},{"group":"Offline page","root":{"title":"Offline page","href":"/docs/offline-page"},"pages":[{"title":"Service workers","href":"/docs/service-workers"},{"title":"Native datastore offline","href":"/docs/native-datastore-offline"}]},{"title":"iOS Split View support","href":"/docs/ios-split-view"},{"title":"Localization","href":"/docs/localization"},{"title":"Liquid Glass (iOS)","href":"/docs/ios-liquid-glass"}]},{"group":"Link handling","pages":[{"title":"Link handling overview","href":"/docs/link-handling-overview"},{"title":"Link behavior","href":"/docs/internal-vs-external-links"},{"group":"Deep linking","root":{"title":"Deep linking overview","href":"/docs/deep-linking"},"pages":[{"title":"Deep Linking Validator","href":"/docs/deep-linking-validator"},{"title":"Custom URL schemes","href":"/docs/url-scheme-protocol"}]}]},{"group":"Permissions","pages":[{"group":"Permissions overview","root":{"title":"Permissions overview","href":"/docs/permissions-overview"},"pages":[{"title":"Permission prompt localization","href":"/docs/permission-prompt-localization"}]},{"title":"Apple App Tracking Transparency","href":"/docs/apple-att"},{"title":"Camera and file uploads","href":"/docs/camera-and-file-uploads"},{"title":"Downloads directory","href":"/docs/downloads-directory"},{"title":"Location services","href":"/docs/location-services"},{"title":"WebRTC audio \u0026 video","href":"/docs/web-rtc"}]},{"group":"Web Overrides","pages":[{"title":"Website overrides overview","href":"/docs/website-overrides-overview"},{"title":"Custom user agent","href":"/docs/custom-user-agent"},{"title":"Custom headers","href":"/docs/custom-headers"},{"title":"Custom CSS","href":"/docs/custom-css"},{"title":"Custom JavaScript","href":"/docs/custom-js"},{"title":"Cookie persistence","href":"/docs/cookie-persistence"}]},{"group":"Native navigation","pages":[{"title":"Native navigation overview","href":"/docs/native-navigation-overview"},{"title":"Native navigation instances","href":"/docs/navigation-instances"},{"title":"Change navigation at runtime","sidebarTitle":"Runtime navigation","href":"/docs/navigation-runtime-api"},{"title":"What changed in native navigation","href":"/docs/native-navigation-changes"},{"title":"Native page transitions","href":"/docs/native-page-transitions"},{"group":"Top navigation bar","root":{"title":"Top navigation bar","href":"/docs/top-navigation-bar"},"pages":[{"title":"Dynamic titles","href":"/docs/dynamic-titles"},{"title":"Auto new windows","href":"/docs/auto-new-windows"},{"title":"Search form","href":"/docs/search-bar-form"},{"title":"Refresh button","href":"/docs/refresh-button"},{"title":"Share button","href":"/docs/share-button"},{"title":"Custom buttons","href":"/docs/add-custom-buttons"},{"title":"Top navigation bar demo app","href":"/docs/top-nav-bar-demo-app"}]},{"group":"Sidebar navigation","root":{"title":"Sidebar navigation","href":"/docs/sidebar-navigation-menu"},"pages":[{"title":"Sidebar Visual Editor","href":"/docs/sidebar-configuration"},{"title":"Dynamic menu items","href":"/docs/dynamic-menu-items"},{"title":"Sidebar demo app","href":"/docs/sidebar-demo-app"}]},{"group":"Bottom tab bar","root":{"title":"Bottom tab bar","href":"/docs/bottom-tab-bar"},"pages":[{"title":"Selecting tabs","href":"/docs/selecting-tabs"},{"title":"Bottom tab bar Visual Editor","href":"/docs/tab-configuration"},{"title":"Dynamic tab menu","href":"/docs/dynamic-tab-menu"},{"title":"Localized tab menu","href":"/docs/localized-tab-menu"},{"title":"Bottom tab demo app","href":"/docs/bottom-tab-demo-app"}]},{"title":"Custom icons","href":"/docs/custom-icons"},{"title":"iOS contextual navigation toolbar","href":"/docs/contextual-navigation-toolbar"}]},{"group":"Push notifications","pages":[{"group":"Push notifications overview","root":{"title":"Push notifications overview","href":"/docs/push-notifications-overview"},"pages":[{"title":"Push SDK migration guide","href":"/docs/push-notification-migration"}]},{"group":"OneSignal","root":{"title":"OneSignal overview","href":"/docs/onesignal"},"pages":[{"title":"Managing permissions and consent","href":"/docs/user-consent-management"},{"title":"Identifying and targeting users","href":"/docs/identifying-targeting-users"},{"group":"Sending push notifications","root":{"title":"Sending push notifications","href":"/docs/onesignal-notifications"},"pages":[{"title":"Programmatic notifications","href":"/docs/programmatic-notifications"},{"title":"Foreground notifications","href":"/docs/foreground-notifications"}]},{"title":"Customize push notifications","href":"/docs/notification-customization"},{"title":"Handling notification taps","href":"/docs/handling-notifications-taps"},{"title":"In-app messages","href":"/docs/in-app-messages"},{"title":"Legacy mode","deprecated":true,"href":"/docs/onesignal-legacy-mode"}]},{"title":"Braze","href":"/docs/braze"},{"title":"Bloomreach","href":"/docs/bloomreach"},{"title":"Cordial","href":"/docs/cordial"},{"group":"Firebase Cloud Messaging (FCM)","root":{"title":"Firebase Cloud Messaging","href":"/docs/firebase-cloud-messaging"},"pages":[{"title":"Firebase Cloud Messaging","href":"/docs/firebase-cloud-messaging"},{"title":"Targeting users with Firebase Cloud Messaging","href":"/docs/fcm-identifying-targeting-users"}]},{"title":"Intercom","href":"/docs/intercom"},{"title":"Iterable","href":"/docs/iterable"},{"title":"Klaviyo","href":"/docs/klaviyo"},{"title":"Customer.io","href":"/docs/customerio"},{"title":"Microsoft Dynamics","href":"/docs/ms-dynamics"},{"title":"MoEngage","href":"/docs/moengage"},{"title":"Optimizely","href":"/docs/optimizely"},{"title":"Salesforce Marketing Cloud","href":"/docs/salesforce-marketing-cloud"},{"title":"Sendbird","href":"/docs/sendbird"}]},{"group":"Median JavaScript Bridge","pages":[{"title":"JavaScript Bridge overview","href":"/docs/javascript-bridge"},{"title":"Detecting app usage","href":"/docs/detecting-app-usage"},{"group":"npm package","root":{"title":"NPM package overview","href":"/docs/npm-package"},"pages":[{"title":"Basic usage","href":"/docs/basic-usage"},{"title":"Using listeners","href":"/docs/npm-package-usage-with-listeners"},{"title":"SPA navigation","href":"/docs/npm-package-spa-navigation"}]},{"title":"Device info","href":"/docs/device-info"},{"title":"Clipboard","href":"/docs/clipboard"},{"title":"Prompt share dialog","href":"/docs/prompt-share-dialogue"},{"title":"App resumed callback","href":"/docs/app-resumed-callback"},{"title":"Keyboard state tracking","href":"/docs/keyboard-state-tracking"},{"title":"Download file","href":"/docs/download-file"},{"title":"Clear WebView cache","description":"Clear the webview cache to show updated content.","href":"/docs/clear-webview-cache"},{"title":"Accessing callbacks in an iframe","href":"/docs/iframe-callbacks"},{"group":"Google Tag Manager","root":{"title":"Control your Median app with Google Tag Manager","description":"Use Median's Google Tag Manager template to inject the JavaScript Bridge into your website and run Bridge commands from GTM tags.","href":"/docs/google-tag-manager"},"pages":[{"title":"Install Median's GTM tag template","href":"/docs/install-median-gtm-template"}]}]},{"group":"Native Plugins","pages":[{"title":"Native plugins overview","href":"/docs/native-plugins-overview"},{"group":"Analytics","root":{"title":"Analytics","href":"/docs/analytics"},"pages":[{"title":"Adjust","href":"/docs/adjust"},{"title":"AppsFlyer","href":"/docs/appsflyer"},{"title":"Branch.io","href":"/docs/branch-io"},{"title":"Google Firebase Analytics","href":"/docs/firebase-analytics"},{"title":"Google Firebase Crashlytics","href":"/docs/crashlytics"},{"title":"Meta App Events","href":"/docs/facebook"},{"title":"Intent Edge","href":"/docs/intent-edge"}]},{"group":"Authentication","root":{"title":"Authentication","href":"/docs/authentication"},"pages":[{"title":"Auth0","href":"/docs/auth0"},{"title":"Clerk","href":"/docs/clerk"},{"group":"Biometric authentication","root":{"title":"Face ID, Touch ID, and Android biometrics","href":"/docs/auth"},"pages":[{"title":"Apple Face ID \u0026 Touch ID","href":"/docs/apple-face-id-touch-id"},{"title":"Android biometric","href":"/docs/android-biometric-auth"}]},{"title":"Passkey authentication (WebAuthn)","href":"/docs/passkey-authentication"},{"group":"Social login","root":{"title":"Social login overview","href":"/docs/social-login"},"pages":[{"title":"Facebook Login configuration","href":"/docs/facebook-login-configuration"},{"title":"Google Sign-In configuration","href":"/docs/google-sign-in-configuration"},{"title":"Sign in with Apple configuration","href":"/docs/sign-in-with-apple-configuration"},{"title":"Website configuration","href":"/docs/social-login-website-configuration"},{"title":"Server-side redirects","href":"/docs/social-login-server-side-redirects"},{"title":"JavaScript callbacks","href":"/docs/social-login-javascript-callbacks"}]}]},{"group":"Enterprise","root":{"title":"Enterprise overview","href":"/docs/enterprise"},"pages":[{"title":"Enterprise security","href":"/docs/enterprise-plugin"},{"title":"Jailbreak/root detection","href":"/docs/jailbreak-root-detection"},{"title":"Microsoft Intune","href":"/docs/microsoft-intune"}]},{"group":"Integrations","root":{"title":"Integrations","href":"/docs/integrations"},"pages":[{"title":"AdMob native ads","href":"/docs/admob-native-ads"},{"title":"Bubble plugin","href":"/docs/bubble-plugin"},{"title":"Card.io","href":"/docs/card-io"},{"title":"Master Lock","href":"/docs/master-lock"},{"title":"RevenueCat","href":"/docs/revenue-cat"},{"group":"Social share","root":{"title":"Social share overview","href":"/docs/social-share"},"pages":[{"title":"Instagram","href":"/docs/social-share-instagram"},{"title":"Snapchat","href":"/docs/social-share-snapchat"}]}]},{"group":"Media","root":{"title":"Media","href":"/docs/media"},"pages":[{"title":"Background audio","href":"/docs/background-audio"},{"title":"JW Player","href":"/docs/jwplayer"},{"title":"Kaltura media player","href":"/docs/kaltura-media-player"},{"title":"Native media player","href":"/docs/native-media-player"},{"title":"Twilio Video","href":"/docs/twilio"},{"title":"Web screenshot","href":"/docs/web-screenshot"},{"title":"Zoom","href":"/docs/zoom"}]},{"group":"Native functionality","root":{"title":"Native functionality","href":"/docs/native-functionality"},"pages":[{"title":"AgeSafety","href":"/docs/age-safety"},{"title":"App review","href":"/docs/app-review"},{"title":"Background location","href":"/docs/background-location"},{"title":"Calendar","href":"/docs/calendar"},{"title":"Haptics","href":"/docs/haptics"},{"title":"Health Bridge","href":"/docs/health-bridge"},{"group":"In-app purchases","root":{"title":"In-App Purchases","href":"/docs/iap"},"pages":[{"title":"Apple In-App Purchases","href":"/docs/apple-iap"},{"title":"Google In-App Purchases","href":"/docs/google-iap"},{"title":"Google In-App Purchases (legacy)","deprecated":true,"href":"/docs/google-iap-legacy"}]},{"title":"Native contacts","href":"/docs/native-contacts"},{"title":"Native datastore","href":"/docs/native-datastore"},{"title":"Offline download manager","href":"/docs/offline-download-manager"},{"title":"Reader modal","href":"/docs/reader-modal"},{"title":"Secure modal","href":"/docs/secure-modal"},{"title":"Share into app","href":"/docs/share-into-app"}]},{"group":"Scanning","root":{"title":"Scanning","href":"/docs/scanning"},"pages":[{"title":"Document scanner","href":"/docs/document-scanner"},{"title":"iBeacon","href":"/docs/ibeacon"},{"title":"NFC tag scanner","href":"/docs/nfc-tag-scanner"},{"title":"QR / barcode scanner","href":"/docs/qr-barcode-scanner"},{"title":"Scandit QR / barcode","href":"/docs/scandit-qr-barcode"}]}]},{"group":"Website builders","pages":[{"title":"Website builder overview","href":"/docs/ai-app-builder-overview"},{"group":"Base44","root":{"title":"Base44","href":"/docs/base44"},"pages":[{"title":"Getting started with Base44","href":"/docs/getting-started-with-base44"},{"title":"Add push notifications to a Base44 app","href":"/docs/add-push-notifications-to-a-base44-app"},{"title":"Adding haptic feedback to your Base44 app","href":"/docs/adding-haptic-feedback-to-your-base44-app"}]},{"group":"Lovable","root":{"title":"Lovable","href":"/docs/lovable"},"pages":[{"title":"Tutorial: Build a fitness tracker app with Lovable and Median","href":"/docs/getting-started-with-lovable"},{"title":"Add push notifications to your Lovable app","href":"/docs/add-push-notifications-to-your-lovable-app"},{"title":"Add haptic feedback to your Lovable app","href":"/docs/add-haptic-feedback-to-your-lovable-app"},{"title":"Prepare your Lovable app for publishing","href":"/docs/prepare-your-lovable-app-for-publishing"}]},{"group":"Replit","root":{"title":"Replit","href":"/docs/replit"},"pages":[{"title":"Getting started with Replit","href":"/docs/getting-started-with-replit"},{"title":"Add push notifications to your Replit app","href":"/docs/add-push-notifications-to-a-replit-app"},{"title":"Add haptic feedback to your Replit app","href":"/docs/add-haptic-feedback-to-your-replit-app"}]},{"group":"Salesforce Experience Cloud","root":{"title":"Salesforce overview","href":"/docs/salesforce"},"pages":[{"title":"Getting started with Salesforce Experience Cloud","href":"/docs/getting-started-with-salesforce-experience-cloud"},{"title":"Lightning Web Components and the Median JavaScript Bridge","href":"/docs/salesforce-lwc-median"},{"title":"Deep linking for Salesforce Experience Cloud","href":"/docs/salesforce-deep-linking"},{"title":"Salesforce LWC component deployment and reference","href":"/docs/salesforce-lwc-components"}]},{"group":"Shopify","root":{"title":"Shopify","href":"/docs/shopify"},"pages":[{"title":"Using Social Login in your Shopify store's mobile app","href":"/docs/using-social-login-in-the-mobile-app-of-your-shopify-store"}]},{"title":"App monetization","href":"/docs/app-monetization"},{"title":"App marketing and growth","href":"/docs/app-marketing-growth"}]},{"group":"Build \u0026 test","pages":[{"title":"Build and test overview","href":"/docs/development-test-deep-dive"},{"title":"Median App Studio","href":"/docs/app-studio"},{"group":"Debug tools","root":{"title":"Debug tools","href":"/docs/debug-tools"},"pages":[{"title":"iOS debugging","href":"/docs/ios-debugging"},{"title":"Android debugging","href":"/docs/android-debugging"}]},{"group":"iOS build \u0026 deployment","root":{"title":"iOS build \u0026 deployment","href":"/docs/ios-build-deployment"},"pages":[{"group":"Building an iOS binary (IPA)","root":{"title":"Building an iOS binary (IPA)","href":"/docs/build-ios-binary"},"pages":[{"title":"Connecting Median with App Store Connect","href":"/docs/connecting-median-appstore-connect"},{"title":"Register testing devices","href":"/docs/registering-testing-devices"},{"title":"Configure signing for your app","href":"/docs/configure-signing-for-your-app"},{"title":"Building an iOS binary with App Groups entitlement","href":"/docs/building-an-ios-binary-for-apps-using-app-groups-entitlements"},{"title":"Install iOS IPA","href":"/docs/install-ios-ipa"}]},{"title":"Build iOS from source","href":"/docs/build-ios-from-source"},{"title":"Common Xcode issues","href":"/docs/common-xcode-issues"},{"title":"Upload an iOS app to TestFlight","href":"/docs/upload-ios-to-testflight"},{"title":"Upload iOS to Apple App Store","href":"/docs/upload-ios-to-apple-app-store"}]},{"group":"Android build \u0026 deployment","root":{"title":"Android build and deployment","href":"/docs/android-build-deployment"},"pages":[{"title":"Install Android APK","href":"/docs/install-android-apk"},{"title":"Build Android from source","href":"/docs/build-android-from-source"},{"title":"Connect Android Studio emulators to localhost websites","href":"/docs/android-studio-with-localhost-website"},{"title":"Android App Bundle (AAB)","href":"/docs/android-app-bundle"},{"title":"Upload Android to Google Play","href":"/docs/upload-android-to-google-play"}]},{"group":"App configuration \u0026 management","root":{"title":"App configuration and management","href":"/docs/app-configuration-management"},"pages":[{"title":"App identifiers","href":"/docs/app-identifiers"},{"title":"App configuration","href":"/docs/app-configuration-appconfigjson"},{"title":"Google Services","href":"/docs/google-services"},{"title":"Google developer verification","href":"/docs/google-developer-verification"},{"title":"Backup management","href":"/docs/backup-management"},{"title":"Multiple app instances","href":"/docs/multiple-app-instances"},{"title":"CI/CD integration","href":"/docs/cicd-integration"}]}]},{"group":"Publishing","pages":[{"title":"Publishing overview","href":"/docs/publishing-overview"},{"title":"Publishing guide","href":"/docs/publishing-guide"},{"title":"Publishing Service process","href":"/docs/publishing-service"},{"title":"Apple App Store","href":"/docs/apple-app-store"},{"title":"Google Play Store","href":"/docs/google-play-store"},{"title":"Screenshot specifications","href":"/docs/app-store-screenshots"},{"title":"Publishing FAQ","href":"/docs/faq-publishing"}]}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/docs/changelog"}]}]},"basePath":"","title":"Accessing callbacks in an iframe - Median Docs","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":[],"chunks":[]}