Hi all, I have a custom Widget that shows up in the main area. When I open or close a workspace, the browser content is reloaded during this operation.
But, I would like the content & states within the widget to be ‘remembered’/retained and not refreshed. Any advice?
export class WebViewWidget extends ReactWidget {
/* .... */
}
Here is the render method for the widget (to fill 100% of parent size)
public render(): React.ReactNode {
this.title.label = 'TestView';
this.title.closable = true;
return <React.Fragment>
<div className='web-view-content'>
<div className="web-view-content-div">
<iframe src="https://theia-ide.org/"></iframe>
</div>
</div>
</React.Fragment>
}
Here is css:
body, html {width: 100%; height: 100%; margin: 0; padding: 0}
.web-view-content-div {position: absolute; top: 0px; left: 0; right: 0; bottom: 0; }
.web-view-content-div iframe {
width: 100%; height: 100%; overflow: auto; border: none;
}
Please advice.