Debug: Reload UI command
parent
cf80b94b19
commit
5481e49393
|
@ -42,6 +42,10 @@ export function reloadPage(): Promise<void> {
|
||||||
return syscall("editor.reloadPage");
|
return syscall("editor.reloadPage");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function reloadUI(): Promise<void> {
|
||||||
|
return syscall("editor.reloadUI");
|
||||||
|
}
|
||||||
|
|
||||||
export function openUrl(url: string, existingWindow = false): Promise<void> {
|
export function openUrl(url: string, existingWindow = false): Promise<void> {
|
||||||
return syscall("editor.openUrl", url, existingWindow);
|
return syscall("editor.openUrl", url, existingWindow);
|
||||||
}
|
}
|
||||||
|
|
|
@ -352,6 +352,11 @@ functions:
|
||||||
command:
|
command:
|
||||||
name: "Debug: Parse Document"
|
name: "Debug: Parse Document"
|
||||||
|
|
||||||
|
reloadUICommand:
|
||||||
|
path: ./debug.ts:reloadUICommand
|
||||||
|
command:
|
||||||
|
name: "Debug: Reload UI"
|
||||||
|
|
||||||
resetClientCommand:
|
resetClientCommand:
|
||||||
path: ./debug.ts:resetClientCommand
|
path: ./debug.ts:resetClientCommand
|
||||||
command:
|
command:
|
||||||
|
|
|
@ -14,3 +14,7 @@ export async function parsePageCommand() {
|
||||||
export async function resetClientCommand() {
|
export async function resetClientCommand() {
|
||||||
await debug.resetClient();
|
await debug.resetClient();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function reloadUICommand() {
|
||||||
|
await editor.reloadUI();
|
||||||
|
}
|
||||||
|
|
|
@ -42,6 +42,9 @@ export function editorSyscalls(editor: Client): SysCallMapping {
|
||||||
"editor.reloadPage": async () => {
|
"editor.reloadPage": async () => {
|
||||||
await editor.reloadPage();
|
await editor.reloadPage();
|
||||||
},
|
},
|
||||||
|
"editor.reloadUI": () => {
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
"editor.openUrl": (_ctx, url: string, existingWindow = false) => {
|
"editor.openUrl": (_ctx, url: string, existingWindow = false) => {
|
||||||
if (!existingWindow) {
|
if (!existingWindow) {
|
||||||
const win = window.open(url, "_blank");
|
const win = window.open(url, "_blank");
|
||||||
|
|
Loading…
Reference in New Issue