I'm afraid you can't. See this answer on tauri's discussion forum - apparently webviews don't route API calls from web workers to the tauri core. Perhaps someday though.