js: Add more API and README

This commit is contained in:
weishu
2024-02-22 22:09:13 +08:00
parent 811c68cac0
commit b904680f13
3 changed files with 53 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ function getUniqueCallbackName() {
return `_callback_${Date.now()}_${callbackCounter++}`;
}
function exec(command, options) {
export function exec(command, options) {
if (typeof options === "undefined") {
options = {};
}
@@ -46,3 +46,11 @@ function exec(command, options) {
}
});
}
export function fullScreen(isFullScreen) {
ksu.fullScreen(isFullScreen);
}
export function toast(message) {
ksu.toast(message);
}