Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected init(): void {
this.node.tabIndex = 0;
this.id = WebviewWidget.FACTORY_ID + ':' + this.identifier.id;
this.title.closable = true;
this.addClass(WebviewWidget.Styles.WEBVIEW);
this.toDispose.push(this.onMessageEmitter);
this.transparentOverlay = document.createElement('div');
this.transparentOverlay.classList.add(MiniBrowserContentStyle.TRANSPARENT_OVERLAY);
this.transparentOverlay.style.display = 'none';
this.node.appendChild(this.transparentOverlay);
this.toDispose.push(this.mouseTracker.onMousedown(() => {
if (this.element.style.display !== 'none') {
this.transparentOverlay.style.display = 'block';
}
}));
this.toDispose.push(this.mouseTracker.onMouseup(() => {
if (this.element.style.display !== 'none') {
this.transparentOverlay.style.display = 'none';
}
}));
const element = document.createElement('iframe');
element.className = 'webview';