File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141
4242 let softReload = ev => {
4343 try {
44- //let html = document.documentElement.outerHTML;
4544 debug ( "Soft reload" , ev ) ; // DEV_ONLY
4645 try {
4746 let doc = window . wrappedJSObject . document ;
5251 if ( isDir || document . contentType !== "text/html" ) {
5352 throw new Error ( `Can't document.write() on ${ isDir ? "directory listings" : document . contentType } ` )
5453 }
54+ DocumentFreezer . unfreeze ( ) ;
55+ let html = document . documentElement . outerHTML ;
5556 doc . open ( ) ;
5657 console . debug ( "Opened" , doc . documentElement ) ;
57- DocumentFreezer . unfreeze ( ) ;
58- ( async ( ) => {
59- let html = await ( ( await fetch ( document . URL ) ) . text ( ) ) ;
60- doc . write ( html ) ;
61- doc . close ( ) ;
62- debug ( "Written" , html )
63- } ) ( ) ;
58+ doc . write ( html ) ;
59+ doc . close ( ) ;
60+ debug ( "Written" , html ) ;
6461 } catch ( e ) {
6562 debug ( "Can't use document.write(), XML document?" , e ) ;
6663 try {
You can’t perform that action at this time.
0 commit comments