-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
refactor: rework transformCallback
#13325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: rework transformCallback
#13325
Conversation
Package Changes Through e9aaa14There are 5 changes which include tauri with minor, @tauri-apps/api with minor, tauri-bundler with patch, tauri-cli with patch, @tauri-apps/cli with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
|
Should we also expose |
c666295 to
2a3e02a
Compare
lucasfernog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have so many great ideas ❤️
This PR refactors
transformCallbackand the functions calls to it into a few js functions, and instead of binding them onwindow, we put them insidewindow.__TAURI_INTERNALS__.callbacksinsteadAlso introduced
window.__TAURI_INTERNALS__.runCallbackto replace the oldwindow['_{cb}']which is quite hard to understand what it's doingwindow.__TAURI_INTERNALS__.unregisterCallbackto replacedelete window['_{cb}']Honestly,
window['_{cb}']is super hard to understand and we also need to useformat_callbackto send a warning message to test if the callback is still there in case of webview reloads