.
This commit is contained in:
parent
c633c9a723
commit
7b34b6b41a
1 changed files with 2 additions and 11 deletions
13
src/index.ts
13
src/index.ts
|
@ -34,13 +34,10 @@ class IFrameWidget extends Widget {
|
|||
iframe.setAttribute('baseURI', '');
|
||||
iframe.src = path;
|
||||
|
||||
this.iframe = iframe;
|
||||
|
||||
div.appendChild(iframe);
|
||||
this.node.appendChild(div);
|
||||
}
|
||||
|
||||
iframe: HTMLIFrameElement;
|
||||
};
|
||||
|
||||
class OpenIFrameWidget extends Widget {
|
||||
|
@ -94,18 +91,12 @@ function activate(app: JupyterLab, docManager: IDocumentManager, palette: IComma
|
|||
return null;
|
||||
}
|
||||
path = <string>result.value;
|
||||
if (!widget){
|
||||
widget = new IFrameWidget(path);
|
||||
}
|
||||
widget.iframe.src = path;
|
||||
widget = new IFrameWidget(path);
|
||||
app.shell.addToMainArea(widget);
|
||||
app.shell.activateById(widget.id);
|
||||
});
|
||||
} else {
|
||||
if (!widget){
|
||||
widget = new IFrameWidget(path);
|
||||
}
|
||||
widget.iframe.src = path;
|
||||
widget = new IFrameWidget(path);
|
||||
app.shell.addToMainArea(widget);
|
||||
app.shell.activateById(widget.id);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue