diff --git a/packages/components/src/sandbox/index.native.js b/packages/components/src/sandbox/index.native.js index 9338cc096fba1..f374e07dec4e3 100644 --- a/packages/components/src/sandbox/index.native.js +++ b/packages/components/src/sandbox/index.native.js @@ -300,7 +300,15 @@ const Sandbox = forwardRef( function Sandbox( // Forward the event to parent event listeners Object.keys( onWindowEvents ).forEach( ( eventType ) => { if ( data?.type === eventType ) { - onWindowEvents[ eventType ]( data ); + try { + onWindowEvents[ eventType ]( data ); + } catch ( e ) { + // eslint-disable-next-line no-console + console.warn( + `Error handling event ${ eventType }`, + e + ); + } } } ); },