mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 17:01:13 +00:00
TypeScript 4.3 (#910)
This commit is contained in:
@@ -7,8 +7,10 @@ export interface IGitHubConnectorParams {
|
||||
|
||||
export const GitHubConnectorMsgType = "GitHubConnectorMsgType";
|
||||
|
||||
export class GitHubConnector {
|
||||
public async start(params: URLSearchParams, window: Window & typeof globalThis): Promise<void> {
|
||||
window.addEventListener("load", async () => {
|
||||
const openerWindow = window.opener;
|
||||
if (openerWindow) {
|
||||
const params = new URLSearchParams(document.location.search);
|
||||
await postRobot.send(
|
||||
window,
|
||||
GitHubConnectorMsgType,
|
||||
@@ -20,14 +22,6 @@ export class GitHubConnector {
|
||||
domain: window.location.origin,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var connector = new GitHubConnector();
|
||||
window.addEventListener("load", async () => {
|
||||
const openerWindow = window.opener;
|
||||
if (openerWindow) {
|
||||
await connector.start(new URLSearchParams(document.location.search), openerWindow);
|
||||
window.close();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user