Replies: 5 comments 43 replies
-
Hi @svefro You can do this by executing JS from backend, for example: async function my_backend_func(e: WebUI.Event) {
// Get folder path...
// Do something...
// const Line = ...
// Run JavaScript (without waiting for response)
e.window.run(`my_frontend_func(${Line});`);
} |
Beta Was this translation helpful? Give feedback.
-
Maybe because you did not include |
Beta Was this translation helpful? Give feedback.
-
ran in to another issue here. i want to use await in a backend function. but i'm not allowed to add async to the callback function. Any tips? |
Beta Was this translation helpful? Give feedback.
-
I fixed all compile issues, and I make it using local dynamic library if exist. However, one compile issue still exist and I run out of time to debug it today... Quick fix is either add error: TS2339 [ERROR]: Property 'run' does not exist on type 'typeof Deno'.
const process = Deno.run({ |
Beta Was this translation helpful? Give feedback.
-
Just found this project and want to test it as a frontend for a small deno app i have.
The app works through a lot of folders and does stuff to files :P
it was a console application that would be run like this. app -raw /home/username/folder_name
Then it would spew out what it was doing in the console. line by line.
After it had recursed in to all folders and was finished it showed a summary in the console.
i want to make a gui for this.
No problem i though.
so i made a function that is called from the frontend passing in the folder path.
but then as the backend is working i want to show the output, line by line in the web gui.
so i tried to set up events from Deno to the frontend with line updates.
but i get "Uncaught TypeError: webui.setEventCallback is not a function"
is this not implemented in deno yet?
How can i have a backend function in Deno publish events to frontend?
Beta Was this translation helpful? Give feedback.
All reactions