My webview labels are created dynamically and they are always different. The flow is like this: an user clicks on a link in my app, that opens a new webview, and the label is an ID related to that link.
I have tried 3 things on my capabilities file based on @amrbashir suggestions:
Set "webviews": ["*"] so It accepts all webviews.
Preappend some text to the webview label, like: label: 'webview-${ID}', and then add it to the capabilities: "webviews": ["webview-*"].
Hard-code the label as label: "childWebview" and add it like you suggested: "webviews": ["childWebview"].
Describe the bug
I want to invoke a command inside an additional webview with the initialization_script but I get a permissions error.
This is how my code looks like:
My webview labels are created dynamically and they are always different. The flow is like this: an user clicks on a link in my app, that opens a new webview, and the label is an ID related to that link.
I have tried 3 things on my capabilities file based on @amrbashir suggestions:
"webviews": ["*"]
so It accepts all webviews.label: 'webview-${ID}'
, and then add it to the capabilities:"webviews": ["webview-*"]
.label: "childWebview"
and add it like you suggested:"webviews": ["childWebview"]
.None of them worked.
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response