webui-dev / v-webui

Use any web browser as GUI, with V in the backend and modern web technologies in the frontend.
https://webui.me
MIT License
112 stars 11 forks source link

Make script function safer and simpler to use #49

Closed ttytm closed 1 year ago

ttytm commented 1 year ago

This PR updates the script method that calls javascript and returns a response.

The current implementation strips away the simple possibility of the parent C API to check if the script has run successfully.

It re-implemets this possibility for the script method and makes it safer and simpler to use.

ttytm commented 1 year ago

ok instead of success is probably a better field name.

hassandraga commented 1 year ago

Actually, I vote for success. It makes the code more readable. Unless 'ok' is common and I don't know.

ttytm commented 1 year ago

Success then it should be!

hassandraga commented 1 year ago

LGTM