diff --git a/examples/commands/index.html b/examples/commands/index.html
index 3abb8cb8a..66841fd70 100644
--- a/examples/commands/index.html
+++ b/examples/commands/index.html
@@ -15,10 +15,13 @@
function runCommand(commandName, args, optional) {
const id = optional ? '#response-optional' : '#response'
const result = document.querySelector(id)
- window.__TAURI__
+ window.__TAURI__.primitives
.invoke(commandName, args)
.then((response) => {
- const val = response instanceof ArrayBuffer ? new TextDecoder().decode(response) : response
+ const val =
+ response instanceof ArrayBuffer
+ ? new TextDecoder().decode(response)
+ : response
result.innerText = `Ok(${val})`
})
.catch((error) => {
diff --git a/examples/isolation/dist/index.html b/examples/isolation/dist/index.html
index 7ecca7406..7af93b540 100644
--- a/examples/isolation/dist/index.html
+++ b/examples/isolation/dist/index.html
@@ -71,7 +71,7 @@
const ping = document.querySelector("#ping")
const pong = document.querySelector('#pong')
ping.addEventListener("click", () => {
- window.__TAURI__.tauri.invoke("ping")
+ window.__TAURI__.primitives.invoke("ping")
.then(() => {
pong.innerText = `ok: ${Date.now()}`
})
diff --git a/examples/parent-window/index.html b/examples/parent-window/index.html
index 776293db7..059607659 100644
--- a/examples/parent-window/index.html
+++ b/examples/parent-window/index.html
@@ -24,7 +24,7 @@
const responseContainer = document.getElementById('response')
function runCommand(commandName, args, optional) {
- window.__TAURI__
+ window.__TAURI__.primitives
.invoke(commandName, args)
.then((response) => {
responseContainer.innerText += `Ok(${response})\n\n`
diff --git a/examples/splashscreen/dist/index.html b/examples/splashscreen/dist/index.html
index 7e96301cf..a51c58d60 100644
--- a/examples/splashscreen/dist/index.html
+++ b/examples/splashscreen/dist/index.html
@@ -6,7 +6,7 @@
document.addEventListener('DOMContentLoaded', () => {
// we delay here just so we can see the splashscreen for a while
setTimeout(() => {
- window.__TAURI__.invoke('close_splashscreen')
+ window.__TAURI__.primitives.invoke('close_splashscreen')
}, 2000)
})
diff --git a/examples/streaming/index.html b/examples/streaming/index.html
index edcc5f020..a0eabf610 100644
--- a/examples/streaming/index.html
+++ b/examples/streaming/index.html
@@ -20,7 +20,7 @@