File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1101,6 +1101,9 @@ async function renderLiveViewMarkdown(file) {
11011101 liveView . innerHTML = '<iframe srcdoc="<!DOCTYPE html><html><head></head><body></body></html>" name="Live view" title="Live view" style="background: hsl(228deg 16% 12%);" class="live-frame" loading="lazy" scrolling="yes" frameborder="0"></iframe>' ;
11021102
11031103 const liveFrame = liveView . querySelector ( '.live-frame' ) ;
1104+
1105+ await new Promise ( resolve => { liveFrame . onload = resolve ; } ) ;
1106+
11041107 const frameDoc = liveFrame . contentDocument ;
11051108
11061109
@@ -1119,9 +1122,7 @@ async function renderLiveViewMarkdown(file) {
11191122
11201123 frameDoc . body . style . display = 'none' ;
11211124 frameDoc . body . innerHTML = html ;
1122-
1123- frameDoc . head . innerHTML = '<base href="about:blank">' ;
1124-
1125+
11251126 if ( isMobile ) frameDoc . body . classList . add ( 'mobile' ) ;
11261127 setAttr ( frameDoc . body , 'dir' , 'auto' ) ;
11271128
You can’t perform that action at this time.
0 commit comments