Explorar o código

fix(cli): use correct arg in `_blanks` links polyfill (#1362)

Amr Bashir %!s(int64=4) %!d(string=hai) anos
pai
achega
4ee044a3e6

+ 5 - 0
.changes/fix-blank-hyperlinks-polyfiil.md

@@ -0,0 +1,5 @@
+---
+"tauri-cli": patch
+---
+
+Fixes `<a target="_blank">` polyfill.

+ 1 - 1
cli/core/src/templates/tauri.js

@@ -171,7 +171,7 @@ if (!String.prototype.startsWith) {
                 __tauriModule: "Shell",
                 message: {
                   cmd: "open",
-                  uri: target.href,
+                  path: target.href,
                 },
               });
               e.preventDefault();

+ 2 - 2
examples/api/src/App.svelte

@@ -1,6 +1,6 @@
 <script>
   import { onMount } from "svelte";
-  import { open } from "@tauri-apps/api/window";
+  import { open } from "@tauri-apps/api/shell";
 
   import Cli from "./components/Cli.svelte";
   import Communication from "./components/Communication.svelte";
@@ -106,4 +106,4 @@
     </p>
     {responses}
   </div>
-</main>
+</main>