tauri
tauri copied to clipboard
[feat] add "Tauri/2.0" to original User Agent from web view which will be useful to decide whether the page is running on Tauri Environment
Describe the problem
Now we could use the windows.userAgent to set custom userAgent from tauri.config.json. but it will overwrite the original information. the original information is useful to get OS, devices, browser name. now we have to change the config for every different platform.
Describe the solution you'd like
Somewhere in webview component could be easy to add a Extra Information like Tauri/2.0 to user agent.
Alternatives considered
No response
Additional context
No response
you can just check if window.__TAURI__ is defined in v1, probably in v2, we will add an explicit const like window.isTauri
@amrbashir need this for server side checks.