File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,21 +95,9 @@ window.addEventListener("message", async (event) => {
9595 inner . setAttribute ( "allow" , allowAttribute ) ;
9696 }
9797 if ( typeof html === "string" ) {
98- // Use document.write instead of srcdoc for WebGL compatibility.
99- // srcdoc creates an opaque origin which prevents WebGL canvas updates
100- // from being displayed properly. document.write preserves the sandbox
101- // origin, allowing WebGL to work correctly.
102- // CSP is enforced via HTTP headers on this page (sandbox.html).
103- const doc = inner . contentDocument || inner . contentWindow ?. document ;
104- if ( doc ) {
105- doc . open ( ) ;
106- doc . write ( html ) ;
107- doc . close ( ) ;
108- } else {
109- // Fallback to srcdoc if document is not accessible
110- console . warn ( "[Sandbox] document.write not available, falling back to srcdoc" ) ;
111- inner . srcdoc = html ;
112- }
98+ inner . srcdoc = html ;
99+ } else {
100+ console . error ( "[Sandbox] Missing or invalid HTML content in sandbox-resource-ready notification." ) ;
113101 }
114102 } else {
115103 if ( inner && inner . contentWindow ) {
You can’t perform that action at this time.
0 commit comments