You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a project with the JS API enabled, use any of the above functions.
See an error in the Javascript console:
unknown variant primaryMonitor, expected createWebview or manage
Additional context
These three functions are standalone functions and call a top-level Tauri command, which is expected to be a variant of the Cmd enum. But these commands are actually in the WindowManagerCmd enum and should be invoked with a window label.
So I think a fix would be to move all three of these functions into the WebviewWindow class and call them with the current window label as a window command. Unless the availableMonitors() and primaryMonitor() functions should be standalone commands, in which case the Rust side will need to be updated to accept these as a top-level command.
Describe the bug
In the window API, the
currentMonitor()
,primaryMonitor()
andavailableMonitors()
functions don't work. They call an incorrect command from the JS side which causes an error.To Reproduce
Steps to reproduce the behavior:
Additional context
These three functions are standalone functions and call a top-level Tauri command, which is expected to be a variant of the
Cmd
enum. But these commands are actually in theWindowManagerCmd
enum and should be invoked with a window label.So I think a fix would be to move all three of these functions into the
WebviewWindow
class and call them with the current window label as a window command. Unless theavailableMonitors()
andprimaryMonitor()
functions should be standalone commands, in which case the Rust side will need to be updated to accept these as a top-level command.Platform and Versions (required):
The text was updated successfully, but these errors were encountered: