From 3062a2bf1e980c6d3cb028b60aa77186861d7f8c Mon Sep 17 00:00:00 2001 From: x-tools-author Date: Mon, 15 Sep 2025 14:32:32 +0800 Subject: [PATCH] chore: update the file --- .gitignore | 1 - res/scripts/js/Demo.js | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 res/scripts/js/Demo.js diff --git a/.gitignore b/.gitignore index 733363c0..1786b904 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,6 @@ compile_commands.json *.aps libs bin -scripts xapps/xprivate .DS_Store ./xprivate \ No newline at end of file diff --git a/res/scripts/js/Demo.js b/res/scripts/js/Demo.js new file mode 100644 index 00000000..3dc45e52 --- /dev/null +++ b/res/scripts/js/Demo.js @@ -0,0 +1,9 @@ +function onBytesRead(data) { + jsRunner.xPrint("read: " + data); + jsRunner.xWriteBytes(data); +} + +while (!jsRunner.xIsInterruptionRequested()) { + jsRunner.xWriteBytes("hello"); + jsRunner.xSleep(1000); +} \ No newline at end of file