Skip to content

Commit 957c317

Browse files
author
smallstone
committed
Add onInitializationFinish event handler to call JStoIdea.getCommandList()
1 parent 2fc6ecb commit 957c317

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

globals.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ interface Window {
22
JSJavaBridge: any;
33
acquireVsCodeApi: any;
44
IdeaToJSMessage: any;
5+
[key: string]: any;
56
}

src/util/ideaBridge.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ class IdeaBridge {
293293
break;
294294
}
295295
};
296+
window.onInitializationFinish = () => {
297+
// 初始化完成
298+
JStoIdea.getCommandList();
299+
};
296300
}
297301

298302
resviceDeleteMessage(res) {

0 commit comments

Comments
 (0)