Skip to content

Instantly share code, notes, and snippets.

@lorenzolewis
Created May 14, 2024 21:38
Show Gist options
  • Save lorenzolewis/ebecfc28c3dd5ca8372f520f6ad26557 to your computer and use it in GitHub Desktop.
Save lorenzolewis/ebecfc28c3dd5ca8372f520f6ad26557 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
diff --git a/src/content/docs/references/javascript/api/Namespace.app.md b/src/content/docs/references/javascript/api/Namespace.app.md
index fe0906ce..fe304476 100644
--- a/src/content/docs/references/javascript/api/Namespace.app.md
+++ b/src/content/docs/references/javascript/api/Namespace.app.md
@@ -7,20 +7,14 @@ sidebar:
## Functions
-<a id="getname" name="getname"></a>
-
### getName()
```ts
-function getName(): Promise<string>;
+getName(): Promise< string >
```
Gets the application name.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -32,24 +26,22 @@ const appName = await getName();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/app.ts:37](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L37)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [app.ts:37](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L37)
-<a id="gettauriversion" name="gettauriversion"></a>
+---
### getTauriVersion()
```ts
-function getTauriVersion(): Promise<string>;
+getTauriVersion(): Promise< string >
```
Gets the Tauri version.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -61,24 +53,22 @@ const tauriVersion = await getTauriVersion();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/app.ts:52](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L52)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="getversion" name="getversion"></a>
+**Source**: [app.ts:52](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L52)
+
+---
### getVersion()
```ts
-function getVersion(): Promise<string>;
+getVersion(): Promise< string >
```
Gets the application version.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -90,24 +80,22 @@ const appVersion = await getVersion();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/app.ts:23](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L23)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="hide" name="hide"></a>
+**Source**: [app.ts:23](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L23)
+
+---
### hide()
```ts
-function hide(): Promise<void>;
+hide(): Promise< void >
```
Hides the application on macOS.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
#### Example
```typescript
@@ -119,24 +107,22 @@ await hide();
1.2.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/app.ts:82](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L82)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-<a id="show" name="show"></a>
+**Source**: [app.ts:82](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L82)
+
+---
### show()
```ts
-function show(): Promise<void>;
+show(): Promise< void >
```
Shows the application on macOS. This function does not automatically focus any specific app window.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
#### Example
```typescript
@@ -148,4 +134,8 @@ await show();
1.2.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/app.ts:67](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L67)
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+**Source**: [app.ts:67](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L67)
diff --git a/src/content/docs/references/javascript/api/Namespace.core.md b/src/content/docs/references/javascript/api/Namespace.core.md
index 4f754c1b..dba46055 100644
--- a/src/content/docs/references/javascript/api/Namespace.core.md
+++ b/src/content/docs/references/javascript/api/Namespace.core.md
@@ -11,82 +11,56 @@ This package is also accessible with `window.__TAURI__.tauri` when [`app.withGlo
## Classes
-<a id="channelt" name="channelt"></a>
-
-### Channel\<T\>
+### Channel
#### Type parameters
-| Type parameter | Value |
-| :------------- | :-------- |
-| `T` | `unknown` |
+| Parameter | Default |
+| :-------- | :-------- |
+| `T` | `unknown` |
#### Constructors
-<a id="constructors" name="constructors"></a>
-
-##### new Channel()
+##### constructor()
```ts
-new Channel<T>(): Channel<T>
+new Channel<T>(): Channel< T >
```
+###### Type parameters
+
+| Parameter | Default |
+| :-------- | :-------- |
+| `T` | `unknown` |
+
###### Returns
-[`Channel`](/references/javascript/api/namespaces/core.md#channelt)\<`T`\>
+[`Channel`](/references/javascript/api/namespacecore/#channel)\< `T` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:37](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L37)
+**Source**: [core.ts:37](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L37)
#### Properties
-| Property | Modifier | Type | Default value |
-| :----------------------------------------------------------------------------------------------- | :-------- | :-------------------------------------------------------------------------------------------------------------- | :------------ |
-| <a id="#nextmessageid" name="#nextmessageid"></a> `#nextMessageId` | `private` | `number` | `0` |
-| <a id="#onmessage" name="#onmessage"></a> `#onmessage` | `private` | (`response`: `T`) => `void` | `...` |
-| <a id="#pendingmessages" name="#pendingmessages"></a> `#pendingMessages` | `private` | [`Record ↗️`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, `T`\> | `{}` |
-| <a id="__tauri_channel_marker__" name="__tauri_channel_marker__"></a> `__TAURI_CHANNEL_MARKER__` | `private` | `true` | `true` |
-| <a id="id" name="id"></a> `id` | `public` | `number` | `undefined` |
+| Property | Type |
+| :-------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------- |
+| `private` <a id="#nextmessageid" name="#nextmessageid"></a> `#nextMessageId` | `number` |
+| `private` <a id="#onmessage" name="#onmessage"></a> `#onmessage` | (`response`) => `void` |
+| `private` <a id="#pendingmessages" name="#pendingmessages"></a> `#pendingMessages` | [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\< `string`, `T` \> |
+| `private` `readonly` <a id="__tauri_channel_marker__" name="__tauri_channel_marker__"></a> `__TAURI_CHANNEL_MARKER__` | `true` |
+| <a id="id" name="id"></a> `id` | `number` |
#### Accessors
-<a id="onmessage" name="onmessage"></a>
-
##### onmessage
```ts
get onmessage(): (response) => void
```
-```ts
-set onmessage(handler): void
-```
-
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :--------------------- |
-| `handler` | (`response`) => `void` |
-
-###### Returns
-
-`Function`
-
-###### Parameters
-
-| Parameter | Type |
-| :--------- | :--- |
-| `response` | `T` |
-
-###### Returns
-
-`void`
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:79](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L79)
+**Sources**: [core.ts:75](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L75), [core.ts:79](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L79)
#### Methods
-<a id="tojson" name="tojson"></a>
-
##### toJSON()
```ts
@@ -97,25 +71,21 @@ toJSON(): string
`string`
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:83](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L83)
+**Source**: [core.ts:83](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L83)
---
-<a id="pluginlistener" name="pluginlistener"></a>
-
### PluginListener
#### Constructors
-<a id="constructors-1" name="constructors-1"></a>
-
-##### new PluginListener()
+##### constructor()
```ts
new PluginListener(
- plugin,
- event,
- channelId): PluginListener
+ plugin,
+ event,
+ channelId): PluginListener
```
###### Parameters
@@ -128,9 +98,9 @@ new PluginListener(
###### Returns
-[`PluginListener`](/references/javascript/api/namespaces/core.md#pluginlistener)
+[`PluginListener`](/references/javascript/api/namespacecore/#pluginlistener)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:93](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L93)
+**Source**: [core.ts:93](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L93)
#### Properties
@@ -142,31 +112,27 @@ new PluginListener(
#### Methods
-<a id="unregister" name="unregister"></a>
-
##### unregister()
```ts
-unregister(): Promise<void>
+unregister(): Promise< void >
```
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:99](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L99)
+**Source**: [core.ts:99](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L99)
---
-<a id="resource" name="resource"></a>
-
### Resource
A rust-backed resource stored through `tauri::Manager::resources_table` API.
The resource lives in the main process and does not exist
in the Javascript world, and thus will not be cleaned up automatiacally
-except on application exit. If you want to clean it up early, call [`Resource.close`](/references/javascript/api/namespaces/core.md#close)
+except on application exit. If you want to clean it up early, call [`Resource.close`](/references/javascript/api/namespacecore/#close)
#### Example
@@ -184,16 +150,14 @@ export class DatabaseHandle extends Resource {
}
```
-#### Extended by
+#### Extended By
-- [`TrayIcon`](/references/javascript/api/namespaces/tray.md#trayicon)
-- [`Image`](/references/javascript/api/namespaces/image.md#image)
+- [`TrayIcon`](/references/javascript/api/namespacetray/#trayicon)
+- [`Image`](/references/javascript/api/namespaceimage/#image)
#### Constructors
-<a id="constructors-2" name="constructors-2"></a>
-
-##### new Resource()
+##### constructor()
```ts
new Resource(rid): Resource
@@ -207,40 +171,32 @@ new Resource(rid): Resource
###### Returns
-[`Resource`](/references/javascript/api/namespaces/core.md#resource)
+[`Resource`](/references/javascript/api/namespacecore/#resource)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:226](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L226)
+**Source**: [core.ts:226](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L226)
#### Properties
-| Property | Modifier | Type |
-| :----------------------------------- | :-------- | :------- |
-| <a id="#rid" name="#rid"></a> `#rid` | `private` | `number` |
+| Property | Type |
+| :-------------------------------------------------------- | :------- |
+| `private` `readonly` <a id="#rid" name="#rid"></a> `#rid` | `number` |
#### Accessors
-<a id="rid" name="rid"></a>
-
##### rid
```ts
get rid(): number
```
-###### Returns
-
-`number`
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
+**Source**: [core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
#### Methods
-<a id="close" name="close"></a>
-
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -248,14 +204,12 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
+**Source**: [core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
## Interfaces
-<a id="invokeoptions" name="invokeoptions"></a>
-
### InvokeOptions
#### Since
@@ -264,18 +218,16 @@ Destroys and cleans up this resource from memory.
#### Properties
-| Property | Type |
-| :-------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="headers" name="headers"></a> `headers` | [`Headers ↗️`](https://developer.mozilla.org/docs/Web/API/Headers) \| [`Record ↗️`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, `string`\> |
+| Property | Type |
+| :-------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="headers" name="headers"></a> `headers` | [`Headers`](https://developer.mozilla.org/docs/Web/API/Headers) \| [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\< `string`, `string` \> |
## Type Aliases
-<a id="invokeargs" name="invokeargs"></a>
-
### InvokeArgs
```ts
-type InvokeArgs: Record<string, unknown> | number[] | ArrayBuffer | Uint8Array;
+InvokeArgs: Record< string, unknown > | number[] | ArrayBuffer | Uint8Array
```
Command arguments.
@@ -284,25 +236,30 @@ Command arguments.
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:131](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L131)
+**Source**: [core.ts:131](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L131)
## Functions
-<a id="addpluginlistener" name="addpluginlistener"></a>
-
### addPluginListener()
```ts
-function addPluginListener<T>(plugin, event, cb): Promise<PluginListener>;
+addPluginListener<T>(
+ plugin,
+ event,
+ cb): Promise< PluginListener >
```
Adds a listener to a plugin event.
+#### Since
+
+2.0.0
+
#### Type parameters
-| Type parameter |
-| :------------- |
-| `T` |
+| Parameter |
+| :-------- |
+| `T` |
#### Parameters
@@ -314,24 +271,18 @@ Adds a listener to a plugin event.
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PluginListener`](/references/javascript/api/namespaces/core.md#pluginlistener)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PluginListener`](/references/javascript/api/namespacecore/#pluginlistener) \>
The listener object to stop listening to the events.
-#### Since
-
-2.0.0
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:114](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L114)
+**Source**: [core.ts:114](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L114)
---
-<a id="convertfilesrc" name="convertfilesrc"></a>
-
### convertFileSrc()
```ts
-function convertFileSrc(filePath, protocol): string;
+convertFileSrc(filePath, protocol = 'asset'): string
```
Convert a device file path to an URL that can be loaded by the webview.
@@ -341,19 +292,6 @@ Example CSP value: `"csp": "default-src 'self' ipc: http://ipc.localhost; img-sr
Additionally, `asset` must be added to [`tauri.allowlist.protocol`](https://tauri.app/v1/api/config/#allowlistconfig.protocol)
in `tauri.conf.json` and its access scope must be defined on the `assetScope` array on the same `protocol` object.
-#### Parameters
-
-| Parameter | Type | Default value | Description |
-| :--------- | :------- | :------------ | :------------------------------------------------------------------------------------------------ |
-| `filePath` | `string` | `undefined` | The file path. |
-| `protocol` | `string` | `'asset'` | The protocol to use. Defaults to `asset`. You only need to set this when using a custom protocol. |
-
-#### Returns
-
-`string`
-
-the URL that can be used as source on the webview.
-
#### Example
```typescript
@@ -375,39 +313,33 @@ video.load();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:193](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L193)
-
----
-
-<a id="invoke" name="invoke"></a>
-
-### invoke()
+#### Parameters
-```ts
-function invoke<T>(cmd, args, options?): Promise<T>;
-```
+| Parameter | Type | Default value | Description |
+| :--------- | :------- | :------------ | :------------------------------------------------------------------------------------------------ |
+| `filePath` | `string` | `undefined` | The file path. |
+| `protocol` | `string` | `'asset'` | The protocol to use. Defaults to `asset`. You only need to set this when using a custom protocol. |
-Sends a message to the backend.
+#### Returns
-#### Type parameters
+`string`
-| Type parameter |
-| :------------- |
-| `T` |
+the URL that can be used as source on the webview.
-#### Parameters
+**Source**: [core.ts:193](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L193)
-| Parameter | Type | Description |
-| :--------- | :----------------------------------------------------------------------------- | :--------------------------------------------- |
-| `cmd` | `string` | The command name. |
-| `args` | [`InvokeArgs`](/references/javascript/api/namespaces/core.md#invokeargs) | The optional arguments to pass to the command. |
-| `options`? | [`InvokeOptions`](/references/javascript/api/namespaces/core.md#invokeoptions) | The request options. |
+---
-#### Returns
+### invoke()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`T`\>
+```ts
+invoke<T>(
+ cmd,
+ args = {},
+ options?): Promise< T >
+```
-A promise resolving or rejecting to the backend response.
+Sends a message to the backend.
#### Example
@@ -420,42 +352,62 @@ await invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:155](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L155)
+#### Type parameters
----
+| Parameter |
+| :-------- |
+| `T` |
-<a id="istauri" name="istauri"></a>
+#### Parameters
+
+| Parameter | Type | Description |
+| :--------- | :------------------------------------------------------------------------- | :--------------------------------------------- |
+| `cmd` | `string` | The command name. |
+| `args` | [`InvokeArgs`](/references/javascript/api/namespacecore/#invokeargs) | The optional arguments to pass to the command. |
+| `options`? | [`InvokeOptions`](/references/javascript/api/namespacecore/#invokeoptions) | The request options. |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `T` \>
+
+A promise resolving or rejecting to the backend response.
+
+**Source**: [core.ts:155](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L155)
+
+---
### isTauri()
```ts
-function isTauri(): unknown;
+isTauri(): unknown
```
#### Returns
`unknown`
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:241](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L241)
+**Source**: [core.ts:241](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L241)
---
-<a id="transformcallback" name="transformcallback"></a>
-
### transformCallback()
```ts
-function transformCallback<T>(callback?, once?): number;
+transformCallback<T>(callback?, once? = false): number
```
Transforms a callback function to a string identifier that can be passed to the backend.
The backend uses the identifier to `eval()` the callback.
+#### Since
+
+1.0.0
+
#### Type parameters
-| Type parameter | Value |
-| :------------- | :-------- |
-| `T` | `unknown` |
+| Parameter | Default |
+| :-------- | :-------- |
+| `T` | `unknown` |
#### Parameters
@@ -470,8 +422,4 @@ The backend uses the identifier to `eval()` the callback.
A unique identifier associated with the callback function.
-#### Since
-
-1.0.0
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:20](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L20)
+**Source**: [core.ts:20](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L20)
diff --git a/src/content/docs/references/javascript/api/Namespace.dpi.md b/src/content/docs/references/javascript/api/Namespace.dpi.md
index 8ea9c08b..192c02fc 100644
--- a/src/content/docs/references/javascript/api/Namespace.dpi.md
+++ b/src/content/docs/references/javascript/api/Namespace.dpi.md
@@ -7,8 +7,6 @@ sidebar:
## Classes
-<a id="logicalposition" name="logicalposition"></a>
-
### LogicalPosition
A position represented in logical pixels.
@@ -19,9 +17,7 @@ A position represented in logical pixels.
#### Constructors
-<a id="constructors" name="constructors"></a>
-
-##### new LogicalPosition()
+##### constructor()
```ts
new LogicalPosition(x, y): LogicalPosition
@@ -36,22 +32,20 @@ new LogicalPosition(x, y): LogicalPosition
###### Returns
-[`LogicalPosition`](/references/javascript/api/namespaces/dpi.md#logicalposition)
+[`LogicalPosition`](/references/javascript/api/namespacedpi/#logicalposition)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/dpi.ts:62](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L62)
+**Source**: [dpi.ts:62](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L62)
#### Properties
-| Property | Type | Default value |
-| :----------------------------------- | :------- | :------------ |
-| <a id="type" name="type"></a> `type` | `string` | `'Logical'` |
-| <a id="x" name="x"></a> `x` | `number` | `undefined` |
-| <a id="y" name="y"></a> `y` | `number` | `undefined` |
+| Property | Type |
+| :----------------------------------- | :------- |
+| <a id="type" name="type"></a> `type` | `string` |
+| <a id="x" name="x"></a> `x` | `number` |
+| <a id="y" name="y"></a> `y` | `number` |
---
-<a id="logicalsize" name="logicalsize"></a>
-
### LogicalSize
A size represented in logical pixels.
@@ -62,9 +56,7 @@ A size represented in logical pixels.
#### Constructors
-<a id="constructors-1" name="constructors-1"></a>
-
-##### new LogicalSize()
+##### constructor()
```ts
new LogicalSize(width, height): LogicalSize
@@ -79,22 +71,20 @@ new LogicalSize(width, height): LogicalSize
###### Returns
-[`LogicalSize`](/references/javascript/api/namespaces/dpi.md#logicalsize)
+[`LogicalSize`](/references/javascript/api/namespacedpi/#logicalsize)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/dpi.ts:15](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L15)
+**Source**: [dpi.ts:15](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L15)
#### Properties
-| Property | Type | Default value |
-| :----------------------------------------- | :------- | :------------ |
-| <a id="height" name="height"></a> `height` | `number` | `undefined` |
-| <a id="type-1" name="type-1"></a> `type` | `string` | `'Logical'` |
-| <a id="width" name="width"></a> `width` | `number` | `undefined` |
+| Property | Type |
+| :----------------------------------------- | :------- |
+| <a id="height" name="height"></a> `height` | `number` |
+| <a id="type" name="type"></a> `type` | `string` |
+| <a id="width" name="width"></a> `width` | `number` |
---
-<a id="physicalposition" name="physicalposition"></a>
-
### PhysicalPosition
A position represented in physical pixels.
@@ -105,9 +95,7 @@ A position represented in physical pixels.
#### Constructors
-<a id="constructors-2" name="constructors-2"></a>
-
-##### new PhysicalPosition()
+##### constructor()
```ts
new PhysicalPosition(x, y): PhysicalPosition
@@ -122,22 +110,20 @@ new PhysicalPosition(x, y): PhysicalPosition
###### Returns
-[`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition)
+[`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/dpi.ts:78](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L78)
+**Source**: [dpi.ts:78](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L78)
#### Properties
-| Property | Type | Default value |
-| :--------------------------------------- | :------- | :------------ |
-| <a id="type-2" name="type-2"></a> `type` | `string` | `'Physical'` |
-| <a id="x-1" name="x-1"></a> `x` | `number` | `undefined` |
-| <a id="y-1" name="y-1"></a> `y` | `number` | `undefined` |
+| Property | Type |
+| :----------------------------------- | :------- |
+| <a id="type" name="type"></a> `type` | `string` |
+| <a id="x" name="x"></a> `x` | `number` |
+| <a id="y" name="y"></a> `y` | `number` |
#### Methods
-<a id="tological" name="tological"></a>
-
##### toLogical()
```ts
@@ -146,16 +132,6 @@ toLogical(scaleFactor): LogicalPosition
Converts the physical position to a logical one.
-###### Parameters
-
-| Parameter | Type |
-| :------------ | :------- |
-| `scaleFactor` | `number` |
-
-###### Returns
-
-[`LogicalPosition`](/references/javascript/api/namespaces/dpi.md#logicalposition)
-
###### Example
```typescript
@@ -166,11 +142,19 @@ const position = await appWindow.innerPosition();
const logical = position.toLogical(factor);
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/dpi.ts:94](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L94)
+###### Parameters
----
+| Parameter | Type |
+| :------------ | :------- |
+| `scaleFactor` | `number` |
+
+###### Returns
-<a id="physicalsize" name="physicalsize"></a>
+[`LogicalPosition`](/references/javascript/api/namespacedpi/#logicalposition)
+
+**Source**: [dpi.ts:94](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L94)
+
+---
### PhysicalSize
@@ -182,9 +166,7 @@ A size represented in physical pixels.
#### Constructors
-<a id="constructors-3" name="constructors-3"></a>
-
-##### new PhysicalSize()
+##### constructor()
```ts
new PhysicalSize(width, height): PhysicalSize
@@ -199,22 +181,20 @@ new PhysicalSize(width, height): PhysicalSize
###### Returns
-[`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize)
+[`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/dpi.ts:31](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L31)
+**Source**: [dpi.ts:31](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L31)
#### Properties
-| Property | Type | Default value |
-| :--------------------------------------------- | :------- | :------------ |
-| <a id="height-1" name="height-1"></a> `height` | `number` | `undefined` |
-| <a id="type-3" name="type-3"></a> `type` | `string` | `'Physical'` |
-| <a id="width-1" name="width-1"></a> `width` | `number` | `undefined` |
+| Property | Type |
+| :----------------------------------------- | :------- |
+| <a id="height" name="height"></a> `height` | `number` |
+| <a id="type" name="type"></a> `type` | `string` |
+| <a id="width" name="width"></a> `width` | `number` |
#### Methods
-<a id="tological-1" name="tological-1"></a>
-
##### toLogical()
```ts
@@ -223,16 +203,6 @@ toLogical(scaleFactor): LogicalSize
Converts the physical size to a logical one.
-###### Parameters
-
-| Parameter | Type |
-| :------------ | :------- |
-| `scaleFactor` | `number` |
-
-###### Returns
-
-[`LogicalSize`](/references/javascript/api/namespaces/dpi.md#logicalsize)
-
###### Example
```typescript
@@ -243,4 +213,14 @@ const size = await appWindow.innerSize();
const logical = size.toLogical(factor);
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/dpi.ts:47](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L47)
+###### Parameters
+
+| Parameter | Type |
+| :------------ | :------- |
+| `scaleFactor` | `number` |
+
+###### Returns
+
+[`LogicalSize`](/references/javascript/api/namespacedpi/#logicalsize)
+
+**Source**: [dpi.ts:47](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L47)
diff --git a/src/content/docs/references/javascript/api/Namespace.event.md b/src/content/docs/references/javascript/api/Namespace.event.md
index ff9f3767..ab46cd0b 100644
--- a/src/content/docs/references/javascript/api/Namespace.event.md
+++ b/src/content/docs/references/javascript/api/Namespace.event.md
@@ -11,8 +11,6 @@ This package is also accessible with `window.__TAURI__.event` when [`app.withGlo
## Enumerations
-<a id="taurievent" name="taurievent"></a>
-
### TauriEvent
#### Since
@@ -21,17 +19,15 @@ This package is also accessible with `window.__TAURI__.event` when [`app.withGlo
#### Enumeration Members
-<a id="drag" name="drag"></a>
-
##### DRAG
```ts
DRAG: 'tauri://drag';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:60](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L60)
+**Source**: [event.ts:60](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L60)
-<a id="drop" name="drop"></a>
+---
##### DROP
@@ -39,9 +35,9 @@ DRAG: 'tauri://drag';
DROP: 'tauri://drop';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:61](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L61)
+**Source**: [event.ts:61](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L61)
-<a id="drop_cancelled" name="drop_cancelled"></a>
+---
##### DROP_CANCELLED
@@ -49,9 +45,9 @@ DROP: 'tauri://drop';
DROP_CANCELLED: 'tauri://drag-cancelled';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:63](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L63)
+**Source**: [event.ts:63](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L63)
-<a id="drop_over" name="drop_over"></a>
+---
##### DROP_OVER
@@ -59,9 +55,9 @@ DROP_CANCELLED: 'tauri://drag-cancelled';
DROP_OVER: 'tauri://drop-over';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:62](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L62)
+**Source**: [event.ts:62](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L62)
-<a id="webview_created" name="webview_created"></a>
+---
##### WEBVIEW_CREATED
@@ -69,9 +65,9 @@ DROP_OVER: 'tauri://drop-over';
WEBVIEW_CREATED: 'tauri://webview-created';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:59](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L59)
+**Source**: [event.ts:59](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L59)
-<a id="window_blur" name="window_blur"></a>
+---
##### WINDOW_BLUR
@@ -79,9 +75,9 @@ WEBVIEW_CREATED: 'tauri://webview-created';
WINDOW_BLUR: 'tauri://blur';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:55](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L55)
+**Source**: [event.ts:55](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L55)
-<a id="window_close_requested" name="window_close_requested"></a>
+---
##### WINDOW_CLOSE_REQUESTED
@@ -89,9 +85,9 @@ WINDOW_BLUR: 'tauri://blur';
WINDOW_CLOSE_REQUESTED: 'tauri://close-requested';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:52](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L52)
+**Source**: [event.ts:52](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L52)
-<a id="window_created" name="window_created"></a>
+---
##### WINDOW_CREATED
@@ -99,9 +95,9 @@ WINDOW_CLOSE_REQUESTED: 'tauri://close-requested';
WINDOW_CREATED: 'tauri://window-created';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:58](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L58)
+**Source**: [event.ts:58](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L58)
-<a id="window_destroyed" name="window_destroyed"></a>
+---
##### WINDOW_DESTROYED
@@ -109,9 +105,9 @@ WINDOW_CREATED: 'tauri://window-created';
WINDOW_DESTROYED: 'tauri://destroyed';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:53](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L53)
+**Source**: [event.ts:53](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L53)
-<a id="window_focus" name="window_focus"></a>
+---
##### WINDOW_FOCUS
@@ -119,9 +115,9 @@ WINDOW_DESTROYED: 'tauri://destroyed';
WINDOW_FOCUS: 'tauri://focus';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:54](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L54)
+**Source**: [event.ts:54](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L54)
-<a id="window_moved" name="window_moved"></a>
+---
##### WINDOW_MOVED
@@ -129,9 +125,9 @@ WINDOW_FOCUS: 'tauri://focus';
WINDOW_MOVED: 'tauri://move';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:51](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L51)
+**Source**: [event.ts:51](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L51)
-<a id="window_resized" name="window_resized"></a>
+---
##### WINDOW_RESIZED
@@ -139,9 +135,9 @@ WINDOW_MOVED: 'tauri://move';
WINDOW_RESIZED: 'tauri://resize';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:50](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L50)
+**Source**: [event.ts:50](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L50)
-<a id="window_scale_factor_changed" name="window_scale_factor_changed"></a>
+---
##### WINDOW_SCALE_FACTOR_CHANGED
@@ -149,9 +145,9 @@ WINDOW_RESIZED: 'tauri://resize';
WINDOW_SCALE_FACTOR_CHANGED: 'tauri://scale-change';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:56](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L56)
+**Source**: [event.ts:56](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L56)
-<a id="window_theme_changed" name="window_theme_changed"></a>
+---
##### WINDOW_THEME_CHANGED
@@ -159,136 +155,105 @@ WINDOW_SCALE_FACTOR_CHANGED: 'tauri://scale-change';
WINDOW_THEME_CHANGED: 'tauri://theme-changed';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L57)
+**Source**: [event.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L57)
## Interfaces
-<a id="eventt" name="eventt"></a>
-
-### Event\<T\>
+### Event
#### Type parameters
-| Type parameter |
-| :------------- |
-| `T` |
+| Parameter |
+| :-------- |
+| `T` |
#### Properties
-| Property | Type | Description |
-| :-------------------------------------------- | :---------------------------------------------------------------------- | :-------------------------------- |
-| <a id="event" name="event"></a> `event` | [`EventName`](/references/javascript/api/namespaces/event.md#eventname) | Event name |
-| <a id="id" name="id"></a> `id` | `number` | Event identifier used to unlisten |
-| <a id="payload" name="payload"></a> `payload` | `T` | Event payload |
+| Property | Type | Description |
+| :-------------------------------------------- | :------------------------------------------------------------------ | :-------------------------------- |
+| <a id="event" name="event"></a> `event` | [`EventName`](/references/javascript/api/namespaceevent/#eventname) | Event name |
+| <a id="id" name="id"></a> `id` | `number` | Event identifier used to unlisten |
+| <a id="payload" name="payload"></a> `payload` | `T` | Event payload |
---
-<a id="options" name="options"></a>
-
### Options
#### Properties
-| Property | Type | Description |
-| :------------------------------------------ | :-------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="target" name="target"></a> `target?` | `string` \| [`EventTarget`](/references/javascript/api/namespaces/event.md#eventtarget) | The event target to listen to, defaults to `{ kind: 'Any' }`, see [EventTarget](/references/javascript/api/namespaces/event.md#eventtarget).<br /><br />If a string is provided, EventTarget.AnyLabel is used. |
+| Property | Type | Description |
+| :------------------------------------------ | :---------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="target" name="target"></a> `target`? | `string` \| [`EventTarget`](/references/javascript/api/namespaceevent/#eventtarget) | The event target to listen to, defaults to `{ kind: 'Any' }`, see [EventTarget](/references/javascript/api/namespaceevent/#eventtarget).<br /><br />If a string is provided, EventTarget.AnyLabel is used. |
## Type Aliases
-<a id="eventcallbackt" name="eventcallbackt"></a>
-
-### EventCallback()\<T\>
+### EventCallback
```ts
-type EventCallback<T>: (event) => void;
+EventCallback: <T> (event) => void
```
#### Type parameters
-| Type parameter |
-| :------------- |
-| `T` |
+| Parameter |
+| :-------- |
+| `T` |
#### Parameters
-| Parameter | Type |
-| :-------- | :---------------------------------------------------------------------- |
-| `event` | [`Event`](/references/javascript/api/namespaces/event.md#eventt)\<`T`\> |
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------- |
+| `event` | [`Event`](/references/javascript/api/namespaceevent/#event)\< `T` \> |
#### Returns
`void`
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:31](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L31)
+**Source**: [event.ts:31](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L31)
---
-<a id="eventname" name="eventname"></a>
-
### EventName
```ts
-type EventName: `${TauriEvent}` | string & Record<never, never>;
+EventName: \${TauriEvent}\ | string & Record< never, never >
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:35](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L35)
+**Source**: [event.ts:35](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L35)
---
-<a id="eventtarget" name="eventtarget"></a>
-
### EventTarget
```ts
-type EventTarget:
- | object
- | object
- | object
- | object
- | object
- | object;
+EventTarget: {kind: "Any";} | {kind: "AnyLabel"; label: string;} | {kind: "App";} | {kind: "Window"; label: string;} | {kind: "Webview"; label: string;} | {kind: "WebviewWindow"; label: string;}
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:14](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L14)
+**Source**: [event.ts:14](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L14)
---
-<a id="unlistenfn" name="unlistenfn"></a>
-
-### UnlistenFn()
+### UnlistenFn
```ts
-type UnlistenFn: () => void;
+UnlistenFn: () => void
```
#### Returns
`void`
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:33](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L33)
+**Source**: [event.ts:33](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L33)
## Functions
-<a id="emit" name="emit"></a>
-
### emit()
```ts
-function emit(event, payload?): Promise<void>;
+emit(event, payload?): Promise< void >
```
-Emits an event to all [targets](/references/javascript/api/namespaces/event.md#eventtarget).
-
-#### Parameters
-
-| Parameter | Type | Description |
-| :--------- | :-------- | :---------------------------------------------------------------------------- |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `payload`? | `unknown` | Event payload. |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+Emits an event to all [targets](/references/javascript/api/namespaceevent/#eventtarget).
#### Example
@@ -301,31 +266,31 @@ await emit('frontend-loaded', { loggedIn: true, token: 'authToken' });
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:176](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L176)
-
----
+#### Parameters
-<a id="emitto" name="emitto"></a>
+| Parameter | Type | Description |
+| :--------- | :-------- | :---------------------------------------------------------------------------- |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `payload`? | `unknown` | Event payload. |
-### emitTo()
+#### Returns
-```ts
-function emitTo(target, event, payload?): Promise<void>;
-```
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-Emits an event to all [targets](/references/javascript/api/namespaces/event.md#eventtarget) matching the given target.
+**Source**: [event.ts:176](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L176)
-#### Parameters
+---
-| Parameter | Type | Description |
-| :--------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
-| `target` | `string` \| [`EventTarget`](/references/javascript/api/namespaces/event.md#eventtarget) | Label of the target Window/Webview/WebviewWindow or raw [EventTarget](/references/javascript/api/namespaces/event.md#eventtarget) object. |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `payload`? | `unknown` | Event payload. |
+### emitTo()
-#### Returns
+```ts
+emitTo(
+ target,
+ event,
+ payload?): Promise< void >
+```
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+Emits an event to all [targets](/references/javascript/api/namespaceevent/#eventtarget) matching the given target.
#### Example
@@ -338,40 +303,32 @@ await emitTo('main', 'frontend-loaded', { loggedIn: true, token: 'authToken' });
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:198](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L198)
-
----
-
-<a id="listen" name="listen"></a>
-
-### listen()
-
-```ts
-function listen<T>(event, handler, options?): Promise<UnlistenFn>;
-```
+#### Parameters
-Listen to an emitted event to any [target](/references/javascript/api/namespaces/event.md#eventtarget).
+| Parameter | Type | Description |
+| :--------- | :---------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ |
+| `target` | `string` \| [`EventTarget`](/references/javascript/api/namespaceevent/#eventtarget) | Label of the target Window/Webview/WebviewWindow or raw [EventTarget](/references/javascript/api/namespaceevent/#eventtarget) object. |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `payload`? | `unknown` | Event payload. |
-#### Type parameters
+#### Returns
-| Type parameter |
-| :------------- |
-| `T` |
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-#### Parameters
+**Source**: [event.ts:198](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L198)
-| Parameter | Type | Description |
-| :--------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
-| `event` | [`EventName`](/references/javascript/api/namespaces/event.md#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`T`\> | Event handler callback. |
-| `options`? | [`Options`](/references/javascript/api/namespaces/event.md#options) | Event listening options. |
+---
-#### Returns
+### listen()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+```ts
+listen<T>(
+ event,
+ handler,
+ options?): Promise< UnlistenFn >
+```
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+Listen to an emitted event to any [target](/references/javascript/api/namespaceevent/#eventtarget).
#### Example
@@ -389,41 +346,42 @@ unlisten();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:103](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L103)
-
----
-
-<a id="once" name="once"></a>
-
-### once()
-
-```ts
-function once<T>(event, handler, options?): Promise<UnlistenFn>;
-```
-
-Listens once to an emitted event to any [target](/references/javascript/api/namespaces/event.md#eventtarget).
-
#### Type parameters
-| Type parameter |
-| :------------- |
-| `T` |
+| Parameter |
+| :-------- |
+| `T` |
#### Parameters
-| Parameter | Type | Description |
-| :--------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
-| `event` | [`EventName`](/references/javascript/api/namespaces/event.md#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`T`\> | Event handler callback. |
-| `options`? | [`Options`](/references/javascript/api/namespaces/event.md#options) | Event listening options. |
+| Parameter | Type | Description |
+| :--------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
+| `event` | [`EventName`](/references/javascript/api/namespaceevent/#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `T` \> | Event handler callback. |
+| `options`? | [`Options`](/references/javascript/api/namespaceevent/#options) | Event listening options. |
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
A promise resolving to a function to unlisten to the event.
Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+**Source**: [event.ts:103](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L103)
+
+---
+
+### once()
+
+```ts
+once<T>(
+ event,
+ handler,
+ options?): Promise< UnlistenFn >
+```
+
+Listens once to an emitted event to any [target](/references/javascript/api/namespaceevent/#eventtarget).
+
#### Example
```typescript
@@ -446,4 +404,25 @@ unlisten();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/event.ts:147](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L147)
+#### Type parameters
+
+| Parameter |
+| :-------- |
+| `T` |
+
+#### Parameters
+
+| Parameter | Type | Description |
+| :--------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
+| `event` | [`EventName`](/references/javascript/api/namespaceevent/#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `T` \> | Event handler callback. |
+| `options`? | [`Options`](/references/javascript/api/namespaceevent/#options) | Event listening options. |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
+
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+
+**Source**: [event.ts:147](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/event.ts#L147)
diff --git a/src/content/docs/references/javascript/api/Namespace.image.md b/src/content/docs/references/javascript/api/Namespace.image.md
index f7cf316c..4aa2096f 100644
--- a/src/content/docs/references/javascript/api/Namespace.image.md
+++ b/src/content/docs/references/javascript/api/Namespace.image.md
@@ -7,46 +7,40 @@ sidebar:
## Classes
-<a id="image" name="image"></a>
-
### Image
An RGBA Image in row-major order from top to bottom.
#### Extends
-- [`Resource`](/references/javascript/api/namespaces/core.md#resource)
+- [`Resource`](/references/javascript/api/namespacecore/#resource)
#### Properties
-| Property | Modifier | Type | Inherited from |
-| :----------------------------------- | :-------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="#rid" name="#rid"></a> `#rid` | `private` | `number` | [`Resource`](/references/javascript/api/namespaces/core.md#resource).[`#rid`](/references/javascript/api/namespaces/core.md##rid) |
+| Property | Type |
+| :-------------------------------------------------------- | :------- |
+| `private` `readonly` <a id="#rid" name="#rid"></a> `#rid` | `number` |
#### Accessors
-<a id="rid" name="rid"></a>
-
##### rid
```ts
get rid(): number
```
-###### Returns
+**Source**: [core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
-`number`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
+[`Resource`](/references/javascript/api/namespacecore/#resource).[`rid`](/references/javascript/api/namespacecore/#rid)
#### Methods
-<a id="close" name="close"></a>
-
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -54,52 +48,52 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-[`Resource`](/references/javascript/api/namespaces/core.md#resource).[`close`](/references/javascript/api/namespaces/core.md#close)
+[`Resource`](/references/javascript/api/namespacecore/#resource).[`close`](/references/javascript/api/namespacecore/#close)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
+**Source**: [core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
-<a id="rgba" name="rgba"></a>
+---
##### rgba()
```ts
-rgba(): Promise<Uint8Array>
+rgba(): Promise< Uint8Array >
```
Returns the RGBA data for this image, in row-major order from top to bottom.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/image.ts:79](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L79)
+**Source**: [image.ts:79](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L79)
-<a id="size" name="size"></a>
+---
##### size()
```ts
-size(): Promise<ImageSize>
+size(): Promise< ImageSize >
```
Returns the size of this image.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`ImageSize`](/references/javascript/api/namespaces/image.md#imagesize)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`ImageSize`](/references/javascript/api/namespaceimage/#imagesize) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/image.ts:86](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L86)
+**Source**: [image.ts:86](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L86)
-<a id="frombytes" name="frombytes"></a>
+---
##### fromBytes()
```ts
-static fromBytes(bytes): Promise<Image>
+static fromBytes(bytes): Promise< Image >
```
Creates a new image using the provided bytes by inferring the file format.
@@ -117,22 +111,22 @@ tauri = { version = "...", features = ["...", "image-png"] }
###### Parameters
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `bytes` | `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
+| Parameter | Type |
+| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `bytes` | `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Image`](/references/javascript/api/namespaces/image.md#image)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Image`](/references/javascript/api/namespaceimage/#image) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/image.ts:52](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L52)
+**Source**: [image.ts:52](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L52)
-<a id="frompath" name="frompath"></a>
+---
##### fromPath()
```ts
-static fromPath(path): Promise<Image>
+static fromPath(path): Promise< Image >
```
Creates a new image using the provided path.
@@ -155,41 +149,39 @@ tauri = { version = "...", features = ["...", "image-png"] }
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Image`](/references/javascript/api/namespaces/image.md#image)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Image`](/references/javascript/api/namespaceimage/#image) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/image.ts:72](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L72)
+**Source**: [image.ts:72](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L72)
-<a id="new" name="new"></a>
+---
##### new()
```ts
static new(
- rgba,
- width,
-height): Promise<Image>
+ rgba,
+ width,
+ height): Promise< Image >
```
Creates a new Image using RGBA data, in row-major order from top to bottom, and with specified width and height.
###### Parameters
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `rgba` | `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
-| `width` | `number` |
-| `height` | `number` |
+| Parameter | Type |
+| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `rgba` | `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
+| `width` | `number` |
+| `height` | `number` |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Image`](/references/javascript/api/namespaces/image.md#image)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Image`](/references/javascript/api/namespaceimage/#image) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/image.ts:27](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L27)
+**Source**: [image.ts:27](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L27)
## Interfaces
-<a id="imagesize" name="imagesize"></a>
-
### ImageSize
#### Properties
@@ -201,12 +193,10 @@ Creates a new Image using RGBA data, in row-major order from top to bottom, and
## Functions
-<a id="transformimage" name="transformimage"></a>
-
### transformImage()
```ts
-function transformImage<T>(image): T;
+transformImage<T>(image): T
```
Transforms image from various types into a type acceptable by Rust.
@@ -216,18 +206,18 @@ Note the API signature is not stable and might change.
#### Type parameters
-| Type parameter |
-| :------------- |
-| `T` |
+| Parameter |
+| :-------- |
+| `T` |
#### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `image` | \| `null` \| `string` \| `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaces/image.md#image) |
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `image` | `null` \| `string` \| `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaceimage/#image) |
#### Returns
`T`
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/image.ts:97](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L97)
+**Source**: [image.ts:97](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/image.ts#L97)
diff --git a/src/content/docs/references/javascript/api/Namespace.menu.md b/src/content/docs/references/javascript/api/Namespace.menu.md
index 18403f82..dcfe727a 100644
--- a/src/content/docs/references/javascript/api/Namespace.menu.md
+++ b/src/content/docs/references/javascript/api/Namespace.menu.md
@@ -7,8 +7,6 @@ sidebar:
## Enumerations
-<a id="nativeicon" name="nativeicon"></a>
-
### NativeIcon
A native Icon to be used for the menu item
@@ -19,8 +17,6 @@ A native Icon to be used for the menu item
#### Enumeration Members
-<a id="add" name="add"></a>
-
##### Add
```ts
@@ -29,9 +25,9 @@ Add: 'Add';
An add item template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:19](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L19)
+**Source**: [menu/iconMenuItem.ts:19](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L19)
-<a id="advanced" name="advanced"></a>
+---
##### Advanced
@@ -41,9 +37,9 @@ Advanced: 'Advanced';
Advanced preferences toolbar icon for the preferences window.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:21](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L21)
+**Source**: [menu/iconMenuItem.ts:21](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L21)
-<a id="bluetooth" name="bluetooth"></a>
+---
##### Bluetooth
@@ -53,9 +49,9 @@ Bluetooth: 'Bluetooth';
A Bluetooth template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:23](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L23)
+**Source**: [menu/iconMenuItem.ts:23](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L23)
-<a id="bookmarks" name="bookmarks"></a>
+---
##### Bookmarks
@@ -65,9 +61,9 @@ Bookmarks: 'Bookmarks';
Bookmarks image suitable for a template.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:25](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L25)
+**Source**: [menu/iconMenuItem.ts:25](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L25)
-<a id="caution" name="caution"></a>
+---
##### Caution
@@ -77,9 +73,9 @@ Caution: 'Caution';
A caution image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:27](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L27)
+**Source**: [menu/iconMenuItem.ts:27](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L27)
-<a id="colorpanel" name="colorpanel"></a>
+---
##### ColorPanel
@@ -89,9 +85,9 @@ ColorPanel: 'ColorPanel';
A color panel toolbar icon.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:29](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L29)
+**Source**: [menu/iconMenuItem.ts:29](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L29)
-<a id="columnview" name="columnview"></a>
+---
##### ColumnView
@@ -101,9 +97,9 @@ ColumnView: 'ColumnView';
A column view mode template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:31](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L31)
+**Source**: [menu/iconMenuItem.ts:31](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L31)
-<a id="computer" name="computer"></a>
+---
##### Computer
@@ -113,9 +109,9 @@ Computer: 'Computer';
A computer icon.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:33](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L33)
+**Source**: [menu/iconMenuItem.ts:33](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L33)
-<a id="enterfullscreen" name="enterfullscreen"></a>
+---
##### EnterFullScreen
@@ -125,9 +121,9 @@ EnterFullScreen: 'EnterFullScreen';
An enter full-screen mode template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:35](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L35)
+**Source**: [menu/iconMenuItem.ts:35](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L35)
-<a id="everyone" name="everyone"></a>
+---
##### Everyone
@@ -137,9 +133,9 @@ Everyone: 'Everyone';
Permissions for all users.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:37](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L37)
+**Source**: [menu/iconMenuItem.ts:37](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L37)
-<a id="exitfullscreen" name="exitfullscreen"></a>
+---
##### ExitFullScreen
@@ -149,9 +145,9 @@ ExitFullScreen: 'ExitFullScreen';
An exit full-screen mode template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:39](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L39)
+**Source**: [menu/iconMenuItem.ts:39](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L39)
-<a id="flowview" name="flowview"></a>
+---
##### FlowView
@@ -161,9 +157,9 @@ FlowView: 'FlowView';
A cover flow view mode template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:41](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L41)
+**Source**: [menu/iconMenuItem.ts:41](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L41)
-<a id="folder" name="folder"></a>
+---
##### Folder
@@ -173,9 +169,9 @@ Folder: 'Folder';
A folder image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:43](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L43)
+**Source**: [menu/iconMenuItem.ts:43](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L43)
-<a id="folderburnable" name="folderburnable"></a>
+---
##### FolderBurnable
@@ -185,9 +181,9 @@ FolderBurnable: 'FolderBurnable';
A burnable folder icon.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:45](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L45)
+**Source**: [menu/iconMenuItem.ts:45](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L45)
-<a id="foldersmart" name="foldersmart"></a>
+---
##### FolderSmart
@@ -197,9 +193,9 @@ FolderSmart: 'FolderSmart';
A smart folder icon.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:47](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L47)
+**Source**: [menu/iconMenuItem.ts:47](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L47)
-<a id="followlinkfreestanding" name="followlinkfreestanding"></a>
+---
##### FollowLinkFreestanding
@@ -209,9 +205,9 @@ FollowLinkFreestanding: 'FollowLinkFreestanding';
A link template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:49](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L49)
+**Source**: [menu/iconMenuItem.ts:49](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L49)
-<a id="fontpanel" name="fontpanel"></a>
+---
##### FontPanel
@@ -221,9 +217,9 @@ FontPanel: 'FontPanel';
A font panel toolbar icon.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:51](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L51)
+**Source**: [menu/iconMenuItem.ts:51](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L51)
-<a id="goleft" name="goleft"></a>
+---
##### GoLeft
@@ -233,9 +229,9 @@ GoLeft: 'GoLeft';
A `go back` template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:53](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L53)
+**Source**: [menu/iconMenuItem.ts:53](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L53)
-<a id="goright" name="goright"></a>
+---
##### GoRight
@@ -245,9 +241,9 @@ GoRight: 'GoRight';
A `go forward` template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:55](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L55)
+**Source**: [menu/iconMenuItem.ts:55](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L55)
-<a id="home" name="home"></a>
+---
##### Home
@@ -257,9 +253,9 @@ Home: 'Home';
Home image suitable for a template.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L57)
+**Source**: [menu/iconMenuItem.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L57)
-<a id="ichattheater" name="ichattheater"></a>
+---
##### IChatTheater
@@ -269,9 +265,9 @@ IChatTheater: 'IChatTheater';
An iChat Theater template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:59](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L59)
+**Source**: [menu/iconMenuItem.ts:59](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L59)
-<a id="iconview" name="iconview"></a>
+---
##### IconView
@@ -281,9 +277,9 @@ IconView: 'IconView';
An icon view mode template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:61](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L61)
+**Source**: [menu/iconMenuItem.ts:61](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L61)
-<a id="info" name="info"></a>
+---
##### Info
@@ -293,9 +289,9 @@ Info: 'Info';
An information toolbar icon.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:63](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L63)
+**Source**: [menu/iconMenuItem.ts:63](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L63)
-<a id="invaliddatafreestanding" name="invaliddatafreestanding"></a>
+---
##### InvalidDataFreestanding
@@ -305,9 +301,9 @@ InvalidDataFreestanding: 'InvalidDataFreestanding';
A template image used to denote invalid data.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:65](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L65)
+**Source**: [menu/iconMenuItem.ts:65](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L65)
-<a id="leftfacingtriangle" name="leftfacingtriangle"></a>
+---
##### LeftFacingTriangle
@@ -317,9 +313,9 @@ LeftFacingTriangle: 'LeftFacingTriangle';
A generic left-facing triangle template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:67](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L67)
+**Source**: [menu/iconMenuItem.ts:67](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L67)
-<a id="listview" name="listview"></a>
+---
##### ListView
@@ -329,9 +325,9 @@ ListView: 'ListView';
A list view mode template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:69](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L69)
+**Source**: [menu/iconMenuItem.ts:69](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L69)
-<a id="locklocked" name="locklocked"></a>
+---
##### LockLocked
@@ -341,9 +337,9 @@ LockLocked: 'LockLocked';
A locked padlock template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:71](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L71)
+**Source**: [menu/iconMenuItem.ts:71](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L71)
-<a id="lockunlocked" name="lockunlocked"></a>
+---
##### LockUnlocked
@@ -353,9 +349,9 @@ LockUnlocked: 'LockUnlocked';
An unlocked padlock template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:73](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L73)
+**Source**: [menu/iconMenuItem.ts:73](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L73)
-<a id="menumixedstate" name="menumixedstate"></a>
+---
##### MenuMixedState
@@ -365,9 +361,9 @@ MenuMixedState: 'MenuMixedState';
A horizontal dash, for use in menus.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:75](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L75)
+**Source**: [menu/iconMenuItem.ts:75](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L75)
-<a id="menuonstate" name="menuonstate"></a>
+---
##### MenuOnState
@@ -377,9 +373,9 @@ MenuOnState: 'MenuOnState';
A check mark template image, for use in menus.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:77](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L77)
+**Source**: [menu/iconMenuItem.ts:77](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L77)
-<a id="mobileme" name="mobileme"></a>
+---
##### MobileMe
@@ -389,9 +385,9 @@ MobileMe: 'MobileMe';
A MobileMe icon.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:79](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L79)
+**Source**: [menu/iconMenuItem.ts:79](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L79)
-<a id="multipledocuments" name="multipledocuments"></a>
+---
##### MultipleDocuments
@@ -401,9 +397,9 @@ MultipleDocuments: 'MultipleDocuments';
A drag image for multiple items.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:81](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L81)
+**Source**: [menu/iconMenuItem.ts:81](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L81)
-<a id="network" name="network"></a>
+---
##### Network
@@ -413,9 +409,9 @@ Network: 'Network';
A network icon.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:83](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L83)
+**Source**: [menu/iconMenuItem.ts:83](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L83)
-<a id="path" name="path"></a>
+---
##### Path
@@ -425,9 +421,9 @@ Path: 'Path';
A path button template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:85](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L85)
+**Source**: [menu/iconMenuItem.ts:85](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L85)
-<a id="preferencesgeneral" name="preferencesgeneral"></a>
+---
##### PreferencesGeneral
@@ -437,9 +433,9 @@ PreferencesGeneral: 'PreferencesGeneral';
General preferences toolbar icon for the preferences window.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:87](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L87)
+**Source**: [menu/iconMenuItem.ts:87](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L87)
-<a id="quicklook" name="quicklook"></a>
+---
##### QuickLook
@@ -449,9 +445,9 @@ QuickLook: 'QuickLook';
A Quick Look template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:89](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L89)
+**Source**: [menu/iconMenuItem.ts:89](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L89)
-<a id="refresh" name="refresh"></a>
+---
##### Refresh
@@ -461,9 +457,9 @@ Refresh: 'Refresh';
A refresh template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:93](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L93)
+**Source**: [menu/iconMenuItem.ts:93](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L93)
-<a id="refreshfreestanding" name="refreshfreestanding"></a>
+---
##### RefreshFreestanding
@@ -473,9 +469,9 @@ RefreshFreestanding: 'RefreshFreestanding';
A refresh template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:91](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L91)
+**Source**: [menu/iconMenuItem.ts:91](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L91)
-<a id="remove" name="remove"></a>
+---
##### Remove
@@ -485,9 +481,9 @@ Remove: 'Remove';
A remove item template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:95](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L95)
+**Source**: [menu/iconMenuItem.ts:95](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L95)
-<a id="revealfreestanding" name="revealfreestanding"></a>
+---
##### RevealFreestanding
@@ -497,9 +493,9 @@ RevealFreestanding: 'RevealFreestanding';
A reveal contents template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:97](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L97)
+**Source**: [menu/iconMenuItem.ts:97](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L97)
-<a id="rightfacingtriangle" name="rightfacingtriangle"></a>
+---
##### RightFacingTriangle
@@ -509,9 +505,9 @@ RightFacingTriangle: 'RightFacingTriangle';
A generic right-facing triangle template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:99](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L99)
+**Source**: [menu/iconMenuItem.ts:99](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L99)
-<a id="share" name="share"></a>
+---
##### Share
@@ -521,9 +517,9 @@ Share: 'Share';
A share view template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:101](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L101)
+**Source**: [menu/iconMenuItem.ts:101](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L101)
-<a id="slideshow" name="slideshow"></a>
+---
##### Slideshow
@@ -533,9 +529,9 @@ Slideshow: 'Slideshow';
A slideshow template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:103](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L103)
+**Source**: [menu/iconMenuItem.ts:103](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L103)
-<a id="smartbadge" name="smartbadge"></a>
+---
##### SmartBadge
@@ -545,9 +541,9 @@ SmartBadge: 'SmartBadge';
A badge for a `smart` item.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:105](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L105)
+**Source**: [menu/iconMenuItem.ts:105](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L105)
-<a id="statusavailable" name="statusavailable"></a>
+---
##### StatusAvailable
@@ -557,9 +553,9 @@ StatusAvailable: 'StatusAvailable';
Small green indicator, similar to iChat’s available image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:107](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L107)
+**Source**: [menu/iconMenuItem.ts:107](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L107)
-<a id="statusnone" name="statusnone"></a>
+---
##### StatusNone
@@ -569,9 +565,9 @@ StatusNone: 'StatusNone';
Small clear indicator.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:109](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L109)
+**Source**: [menu/iconMenuItem.ts:109](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L109)
-<a id="statuspartiallyavailable" name="statuspartiallyavailable"></a>
+---
##### StatusPartiallyAvailable
@@ -581,9 +577,9 @@ StatusPartiallyAvailable: 'StatusPartiallyAvailable';
Small yellow indicator, similar to iChat’s idle image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:111](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L111)
+**Source**: [menu/iconMenuItem.ts:111](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L111)
-<a id="statusunavailable" name="statusunavailable"></a>
+---
##### StatusUnavailable
@@ -593,9 +589,9 @@ StatusUnavailable: 'StatusUnavailable';
Small red indicator, similar to iChat’s unavailable image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:113](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L113)
+**Source**: [menu/iconMenuItem.ts:113](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L113)
-<a id="stopprogress" name="stopprogress"></a>
+---
##### StopProgress
@@ -605,9 +601,9 @@ StopProgress: 'StopProgress';
A stop progress button template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:117](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L117)
+**Source**: [menu/iconMenuItem.ts:117](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L117)
-<a id="stopprogressfreestanding" name="stopprogressfreestanding"></a>
+---
##### StopProgressFreestanding
@@ -617,9 +613,9 @@ StopProgressFreestanding: 'StopProgressFreestanding';
A stop progress template image.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:115](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L115)
+**Source**: [menu/iconMenuItem.ts:115](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L115)
-<a id="trashempty" name="trashempty"></a>
+---
##### TrashEmpty
@@ -629,9 +625,9 @@ TrashEmpty: 'TrashEmpty';
An image of the empty trash can.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:119](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L119)
+**Source**: [menu/iconMenuItem.ts:119](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L119)
-<a id="trashfull" name="trashfull"></a>
+---
##### TrashFull
@@ -641,9 +637,9 @@ TrashFull: 'TrashFull';
An image of the full trash can.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:121](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L121)
+**Source**: [menu/iconMenuItem.ts:121](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L121)
-<a id="user" name="user"></a>
+---
##### User
@@ -653,9 +649,9 @@ User: 'User';
Permissions for a single user.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:123](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L123)
+**Source**: [menu/iconMenuItem.ts:123](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L123)
-<a id="useraccounts" name="useraccounts"></a>
+---
##### UserAccounts
@@ -665,9 +661,9 @@ UserAccounts: 'UserAccounts';
User account toolbar icon for the preferences window.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:125](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L125)
+**Source**: [menu/iconMenuItem.ts:125](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L125)
-<a id="usergroup" name="usergroup"></a>
+---
##### UserGroup
@@ -677,9 +673,9 @@ UserGroup: 'UserGroup';
Permissions for a group of users.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:127](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L127)
+**Source**: [menu/iconMenuItem.ts:127](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L127)
-<a id="userguest" name="userguest"></a>
+---
##### UserGuest
@@ -689,15 +685,13 @@ UserGuest: 'UserGuest';
Permissions for guests.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:129](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L129)
+**Source**: [menu/iconMenuItem.ts:129](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L129)
## Classes
-<a id="checkmenuitem" name="checkmenuitem"></a>
-
### CheckMenuItem
-A check menu item inside a [`Menu`](/references/javascript/api/namespaces/menu.md#menu) or [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
+A check menu item inside a [`Menu`](/references/javascript/api/namespacemenu/#menu) or [`Submenu`](/references/javascript/api/namespacemenu/#submenu)
and usually contains a text and a check mark or a similar toggle
that corresponds to a checked and unchecked states.
@@ -707,29 +701,25 @@ that corresponds to a checked and unchecked states.
#### Properties
-| Property | Modifier | Type | Inherited from |
-| :----------------------------------- | :-------- | :------- | :------------------ |
-| <a id="#rid" name="#rid"></a> `#rid` | `private` | `number` | `MenuItemBase.#rid` |
+| Property | Type |
+| :-------------------------------------------------------- | :------- |
+| `private` `readonly` <a id="#rid" name="#rid"></a> `#rid` | `number` |
#### Accessors
-<a id="id" name="id"></a>
-
##### id
```ts
get id(): string
```
-The id of this item.
+**Source**: [menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
-###### Returns
-
-`string`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
+MenuItemBase.id
-<a id="rid" name="rid"></a>
+---
##### rid
@@ -737,20 +727,18 @@ The id of this item.
get rid(): number
```
-###### Returns
+**Source**: [core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
-`number`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
+MenuItemBase.rid
#### Methods
-<a id="close" name="close"></a>
-
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -758,52 +746,52 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-`MenuItemBase.close`
+MenuItemBase.close
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
+**Source**: [core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
-<a id="ischecked" name="ischecked"></a>
+---
##### isChecked()
```ts
-isChecked(): Promise<boolean>
+isChecked(): Promise< boolean >
```
Returns whether this check menu item is checked or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/checkMenuItem.ts:71](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L71)
+**Source**: [menu/checkMenuItem.ts:71](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L71)
-<a id="isenabled" name="isenabled"></a>
+---
##### isEnabled()
```ts
-isEnabled(): Promise<boolean>
+isEnabled(): Promise< boolean >
```
Returns whether this check menu item is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/checkMenuItem.ts:48](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L48)
+**Source**: [menu/checkMenuItem.ts:48](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L48)
-<a id="setaccelerator" name="setaccelerator"></a>
+---
##### setAccelerator()
```ts
-setAccelerator(accelerator): Promise<void>
+setAccelerator(accelerator): Promise< void >
```
Sets the accelerator for this check menu item.
@@ -816,16 +804,16 @@ Sets the accelerator for this check menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/checkMenuItem.ts:62](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L62)
+**Source**: [menu/checkMenuItem.ts:62](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L62)
-<a id="setchecked" name="setchecked"></a>
+---
##### setChecked()
```ts
-setChecked(checked): Promise<void>
+setChecked(checked): Promise< void >
```
Sets whether this check menu item is checked or not.
@@ -838,16 +826,16 @@ Sets whether this check menu item is checked or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/checkMenuItem.ts:76](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L76)
+**Source**: [menu/checkMenuItem.ts:76](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L76)
-<a id="setenabled" name="setenabled"></a>
+---
##### setEnabled()
```ts
-setEnabled(enabled): Promise<void>
+setEnabled(enabled): Promise< void >
```
Sets whether this check menu item is enabled or not.
@@ -860,16 +848,16 @@ Sets whether this check menu item is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/checkMenuItem.ts:53](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L53)
+**Source**: [menu/checkMenuItem.ts:53](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L53)
-<a id="settext" name="settext"></a>
+---
##### setText()
```ts
-setText(text): Promise<void>
+setText(text): Promise< void >
```
Sets the text for this check menu item.
@@ -882,55 +870,53 @@ Sets the text for this check menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/checkMenuItem.ts:39](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L39)
+**Source**: [menu/checkMenuItem.ts:39](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L39)
-<a id="text" name="text"></a>
+---
##### text()
```ts
-text(): Promise<string>
+text(): Promise< string >
```
Returns the text of this check menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/checkMenuItem.ts:34](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L34)
+**Source**: [menu/checkMenuItem.ts:34](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L34)
-<a id="new" name="new"></a>
+---
##### new()
```ts
-static new(opts): Promise<CheckMenuItem>
+static new(opts): Promise< CheckMenuItem >
```
Create a new check menu item.
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------- |
-| `opts` | [`CheckMenuItemOptions`](/references/javascript/api/namespaces/menu.md#checkmenuitemoptions) |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------------------- |
+| `opts` | [`CheckMenuItemOptions`](/references/javascript/api/namespacemenu/#checkmenuitemoptions) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/checkMenuItem.ts:27](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L27)
+**Source**: [menu/checkMenuItem.ts:27](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/checkMenuItem.ts#L27)
---
-<a id="iconmenuitem" name="iconmenuitem"></a>
-
### IconMenuItem
-An icon menu item inside a [`Menu`](/references/javascript/api/namespaces/menu.md#menu) or [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
+An icon menu item inside a [`Menu`](/references/javascript/api/namespacemenu/#menu) or [`Submenu`](/references/javascript/api/namespacemenu/#submenu)
and usually contains an icon and a text.
#### Extends
@@ -939,29 +925,25 @@ and usually contains an icon and a text.
#### Properties
-| Property | Modifier | Type | Inherited from |
-| :--------------------------------------- | :-------- | :------- | :------------------ |
-| <a id="#rid-1" name="#rid-1"></a> `#rid` | `private` | `number` | `MenuItemBase.#rid` |
+| Property | Type |
+| :-------------------------------------------------------- | :------- |
+| `private` `readonly` <a id="#rid" name="#rid"></a> `#rid` | `number` |
#### Accessors
-<a id="id-1" name="id-1"></a>
-
##### id
```ts
get id(): string
```
-The id of this item.
-
-###### Returns
+**Source**: [menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
-`string`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
+MenuItemBase.id
-<a id="rid-1" name="rid-1"></a>
+---
##### rid
@@ -969,20 +951,18 @@ The id of this item.
get rid(): number
```
-###### Returns
+**Source**: [core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
-`number`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
+MenuItemBase.rid
#### Methods
-<a id="close-1" name="close-1"></a>
-
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -990,36 +970,36 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-`MenuItemBase.close`
+MenuItemBase.close
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
+**Source**: [core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
-<a id="isenabled-1" name="isenabled-1"></a>
+---
##### isEnabled()
```ts
-isEnabled(): Promise<boolean>
+isEnabled(): Promise< boolean >
```
Returns whether this icon menu item is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:170](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L170)
+**Source**: [menu/iconMenuItem.ts:170](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L170)
-<a id="setaccelerator-1" name="setaccelerator-1"></a>
+---
##### setAccelerator()
```ts
-setAccelerator(accelerator): Promise<void>
+setAccelerator(accelerator): Promise< void >
```
Sets the accelerator for this icon menu item.
@@ -1032,16 +1012,16 @@ Sets the accelerator for this icon menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:184](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L184)
+**Source**: [menu/iconMenuItem.ts:184](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L184)
-<a id="setenabled-1" name="setenabled-1"></a>
+---
##### setEnabled()
```ts
-setEnabled(enabled): Promise<void>
+setEnabled(enabled): Promise< void >
```
Sets whether this icon menu item is enabled or not.
@@ -1054,38 +1034,38 @@ Sets whether this icon menu item is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:175](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L175)
+**Source**: [menu/iconMenuItem.ts:175](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L175)
-<a id="seticon" name="seticon"></a>
+---
##### setIcon()
```ts
-setIcon(icon): Promise<void>
+setIcon(icon): Promise< void >
```
Sets an icon for this icon menu item
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `icon` | \| `null` \| `string` \| `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaces/image.md#image) |
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `icon` | `null` \| `string` \| `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaceimage/#image) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:193](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L193)
+**Source**: [menu/iconMenuItem.ts:193](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L193)
-<a id="settext-1" name="settext-1"></a>
+---
##### setText()
```ts
-setText(text): Promise<void>
+setText(text): Promise< void >
```
Sets the text for this icon menu item.
@@ -1098,52 +1078,50 @@ Sets the text for this icon menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:161](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L161)
+**Source**: [menu/iconMenuItem.ts:161](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L161)
-<a id="text-1" name="text-1"></a>
+---
##### text()
```ts
-text(): Promise<string>
+text(): Promise< string >
```
Returns the text of this icon menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:156](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L156)
+**Source**: [menu/iconMenuItem.ts:156](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L156)
-<a id="new-1" name="new-1"></a>
+---
##### new()
```ts
-static new(opts): Promise<IconMenuItem>
+static new(opts): Promise< IconMenuItem >
```
Create a new icon menu item.
###### Parameters
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------- |
-| `opts` | [`IconMenuItemOptions`](/references/javascript/api/namespaces/menu.md#iconmenuitemoptions) |
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------- |
+| `opts` | [`IconMenuItemOptions`](/references/javascript/api/namespacemenu/#iconmenuitemoptions) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/iconMenuItem.ts:151](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L151)
+**Source**: [menu/iconMenuItem.ts:151](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/iconMenuItem.ts#L151)
---
-<a id="menu" name="menu"></a>
-
### Menu
A type that is either a menu bar on the window
@@ -1155,29 +1133,25 @@ on Windows and Linux or as a global menu in the menubar on macOS.
#### Properties
-| Property | Modifier | Type | Inherited from |
-| :--------------------------------------- | :-------- | :------- | :------------------ |
-| <a id="#rid-2" name="#rid-2"></a> `#rid` | `private` | `number` | `MenuItemBase.#rid` |
+| Property | Type |
+| :-------------------------------------------------------- | :------- |
+| `private` `readonly` <a id="#rid" name="#rid"></a> `#rid` | `number` |
#### Accessors
-<a id="id-2" name="id-2"></a>
-
##### id
```ts
get id(): string
```
-The id of this item.
-
-###### Returns
+**Source**: [menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
-`string`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
+MenuItemBase.id
-<a id="rid-2" name="rid-2"></a>
+---
##### rid
@@ -1185,44 +1159,31 @@ The id of this item.
get rid(): number
```
-###### Returns
+**Source**: [core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
-`number`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
+MenuItemBase.rid
#### Methods
-<a id="append" name="append"></a>
-
##### append()
```ts
-append<T>(items): Promise<void>
+append<T>(items): Promise< void >
```
Add a menu item to the end of this menu.
## Platform-spcific:
-- **macOS:** Only [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)s can be added to a [`Menu`](/references/javascript/api/namespaces/menu.md#menu).
+- **macOS:** Only [`Submenu`](/references/javascript/api/namespacemenu/#submenu)s can be added to a [`Menu`](/references/javascript/api/namespacemenu/#menu).
###### Type parameters
-| Type parameter |
-| :------------- |
-
-| `T` _extends_
-\| [`CheckMenuItemOptions`](/references/javascript/api/namespaces/menu.md#checkmenuitemoptions)
-\| [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions)
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItemOptions`](/references/javascript/api/namespaces/menu.md#iconmenuitemoptions)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItemOptions`](/references/javascript/api/namespaces/menu.md#predefinedmenuitemoptions)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`SubmenuOptions`](/references/javascript/api/namespaces/menu.md#submenuoptions)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem) |
+| Parameter |
+| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `T` _extends_ [`CheckMenuItemOptions`](/references/javascript/api/namespacemenu/#checkmenuitemoptions) \| [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions) \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItemOptions`](/references/javascript/api/namespacemenu/#iconmenuitemoptions) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItemOptions`](/references/javascript/api/namespacemenu/#predefinedmenuitemoptions) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`SubmenuOptions`](/references/javascript/api/namespacemenu/#submenuoptions) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) |
###### Parameters
@@ -1232,16 +1193,16 @@ Add a menu item to the end of this menu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:97](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L97)
+**Source**: [menu/menu.ts:97](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L97)
-<a id="close-2" name="close-2"></a>
+---
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -1249,26 +1210,20 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-`MenuItemBase.close`
+MenuItemBase.close
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
+**Source**: [core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
-<a id="get" name="get"></a>
+---
##### get()
```ts
-get(id): Promise<
- | null
- | CheckMenuItem
- | IconMenuItem
- | PredefinedMenuItem
- | Submenu
-| MenuItem>
+get(id): Promise< null | CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem >
```
Retrieves the menu item matching the given identifier.
@@ -1281,46 +1236,29 @@ Retrieves the menu item matching the given identifier.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<
-\| `null`
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:220](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L220)
+**Source**: [menu/menu.ts:220](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L220)
-<a id="insert" name="insert"></a>
+---
##### insert()
```ts
-insert<T>(items, position): Promise<void>
+insert<T>(items, position): Promise< void >
```
Add a menu item to the specified position in this menu.
## Platform-spcific:
-- **macOS:** Only [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)s can be added to a [`Menu`](/references/javascript/api/namespaces/menu.md#menu).
+- **macOS:** Only [`Submenu`](/references/javascript/api/namespacemenu/#submenu)s can be added to a [`Menu`](/references/javascript/api/namespacemenu/#menu).
###### Type parameters
-| Type parameter |
-| :------------- |
-
-| `T` _extends_
-\| [`CheckMenuItemOptions`](/references/javascript/api/namespaces/menu.md#checkmenuitemoptions)
-\| [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions)
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItemOptions`](/references/javascript/api/namespaces/menu.md#iconmenuitemoptions)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItemOptions`](/references/javascript/api/namespaces/menu.md#predefinedmenuitemoptions)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`SubmenuOptions`](/references/javascript/api/namespaces/menu.md#submenuoptions)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem) |
+| Parameter |
+| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `T` _extends_ [`CheckMenuItemOptions`](/references/javascript/api/namespacemenu/#checkmenuitemoptions) \| [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions) \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItemOptions`](/references/javascript/api/namespacemenu/#iconmenuitemoptions) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItemOptions`](/references/javascript/api/namespacemenu/#predefinedmenuitemoptions) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`SubmenuOptions`](/references/javascript/api/namespacemenu/#submenuoptions) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) |
###### Parameters
@@ -1331,42 +1269,32 @@ Add a menu item to the specified position in this menu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:155](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L155)
+**Source**: [menu/menu.ts:155](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L155)
-<a id="items" name="items"></a>
+---
##### items()
```ts
-items(): Promise<(
- | CheckMenuItem
- | IconMenuItem
- | PredefinedMenuItem
- | Submenu
-| MenuItem)[]>
+items(): Promise< (CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem)[] >
```
Returns a list of menu items that has been added to this menu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<(
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem))[]\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< ([`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem))[] \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:208](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L208)
+**Source**: [menu/menu.ts:208](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L208)
-<a id="popup" name="popup"></a>
+---
##### popup()
```ts
-popup(at?, window?): Promise<void>
+popup(at?, window?): Promise< void >
```
Popup this menu as a context menu on the specified window.
@@ -1375,47 +1303,36 @@ If the position, is provided, it is relative to the window's top-left corner.
###### Parameters
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `at`? | [`LogicalPosition`](/references/javascript/api/namespaces/dpi.md#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition) |
-| `window`? | [`Window`](/references/javascript/api/namespaces/window.md#window) |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `at`? | [`LogicalPosition`](/references/javascript/api/namespacedpi/#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) |
+| `window`? | [`Window`](/references/javascript/api/namespacewindow/#window) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:242](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L242)
+**Source**: [menu/menu.ts:242](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L242)
-<a id="prepend" name="prepend"></a>
+---
##### prepend()
```ts
-prepend<T>(items): Promise<void>
+prepend<T>(items): Promise< void >
```
Add a menu item to the beginning of this menu.
## Platform-spcific:
-- **macOS:** Only [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)s can be added to a [`Menu`](/references/javascript/api/namespaces/menu.md#menu).
+- **macOS:** Only [`Submenu`](/references/javascript/api/namespacemenu/#submenu)s can be added to a [`Menu`](/references/javascript/api/namespacemenu/#menu).
###### Type parameters
-| Type parameter |
-| :------------- |
-
-| `T` _extends_
-\| [`CheckMenuItemOptions`](/references/javascript/api/namespaces/menu.md#checkmenuitemoptions)
-\| [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions)
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItemOptions`](/references/javascript/api/namespaces/menu.md#iconmenuitemoptions)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItemOptions`](/references/javascript/api/namespaces/menu.md#predefinedmenuitemoptions)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`SubmenuOptions`](/references/javascript/api/namespaces/menu.md#submenuoptions)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem) |
+| Parameter |
+| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `T` _extends_ [`CheckMenuItemOptions`](/references/javascript/api/namespacemenu/#checkmenuitemoptions) \| [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions) \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItemOptions`](/references/javascript/api/namespacemenu/#iconmenuitemoptions) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItemOptions`](/references/javascript/api/namespacemenu/#predefinedmenuitemoptions) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`SubmenuOptions`](/references/javascript/api/namespacemenu/#submenuoptions) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) |
###### Parameters
@@ -1425,44 +1342,38 @@ Add a menu item to the beginning of this menu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:126](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L126)
+**Source**: [menu/menu.ts:126](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L126)
-<a id="remove-1" name="remove-1"></a>
+---
##### remove()
```ts
-remove(item): Promise<void>
+remove(item): Promise< void >
```
Remove a menu item from this menu.
###### Parameters
-| Parameter | Type |
-| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `item` | \| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu) \| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem) |
+| Parameter | Type |
+| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `item` | [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:179](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L179)
+**Source**: [menu/menu.ts:179](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L179)
-<a id="removeat" name="removeat"></a>
+---
##### removeAt()
```ts
-removeAt(position): Promise<
- | null
- | CheckMenuItem
- | IconMenuItem
- | PredefinedMenuItem
- | Submenu
-| MenuItem>
+removeAt(position): Promise< null | CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem >
```
Remove a menu item from this menu at the specified position.
@@ -1475,22 +1386,16 @@ Remove a menu item from this menu at the specified position.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<
-\| `null`
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:190](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L190)
+**Source**: [menu/menu.ts:190](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L190)
-<a id="setasappmenu" name="setasappmenu"></a>
+---
##### setAsAppMenu()
```ts
-setAsAppMenu(): Promise<null | Menu>
+setAsAppMenu(): Promise< null | Menu >
```
Sets the app-wide menu and returns the previous one.
@@ -1500,16 +1405,16 @@ this menu will be assigned to it.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| [`Menu`](/references/javascript/api/namespaces/menu.md#menu)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`Menu`](/references/javascript/api/namespacemenu/#menu) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:268](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L268)
+**Source**: [menu/menu.ts:268](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L268)
-<a id="setaswindowmenu" name="setaswindowmenu"></a>
+---
##### setAsWindowMenu()
```ts
-setAsWindowMenu(window?): Promise<null | Menu>
+setAsWindowMenu(window?): Promise< null | Menu >
```
Sets the window menu and returns the previous one.
@@ -1517,65 +1422,63 @@ Sets the window menu and returns the previous one.
#### Platform-specific:
- **macOS:** Unsupported. The menu on macOS is app-wide and not specific to one
- window, if you need to set it, use [`Menu.setAsAppMenu`](/references/javascript/api/namespaces/menu.md#setasappmenu) instead.
+ window, if you need to set it, use [`Menu.setAsAppMenu`](/references/javascript/api/namespacemenu/#setasappmenu) instead.
###### Parameters
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------- |
-| `window`? | [`Window`](/references/javascript/api/namespaces/window.md#window) |
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------- |
+| `window`? | [`Window`](/references/javascript/api/namespacewindow/#window) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| [`Menu`](/references/javascript/api/namespaces/menu.md#menu)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`Menu`](/references/javascript/api/namespacemenu/#menu) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:282](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L282)
+**Source**: [menu/menu.ts:282](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L282)
-<a id="default" name="default"></a>
+---
##### default()
```ts
-static default(): Promise<Menu>
+static default(): Promise< Menu >
```
Create a default menu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Menu`](/references/javascript/api/namespaces/menu.md#menu)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Menu`](/references/javascript/api/namespacemenu/#menu) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:84](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L84)
+**Source**: [menu/menu.ts:84](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L84)
-<a id="new-2" name="new-2"></a>
+---
##### new()
```ts
-static new(opts?): Promise<Menu>
+static new(opts?): Promise< Menu >
```
Create a new menu.
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------- |
-| `opts`? | [`MenuOptions`](/references/javascript/api/namespaces/menu.md#menuoptions) |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------- |
+| `opts`? | [`MenuOptions`](/references/javascript/api/namespacemenu/#menuoptions) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Menu`](/references/javascript/api/namespaces/menu.md#menu)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Menu`](/references/javascript/api/namespacemenu/#menu) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menu.ts:79](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L79)
+**Source**: [menu/menu.ts:79](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menu.ts#L79)
---
-<a id="menuitem" name="menuitem"></a>
-
### MenuItem
-A menu item inside a [`Menu`](/references/javascript/api/namespaces/menu.md#menu) or [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu) and contains only text.
+A menu item inside a [`Menu`](/references/javascript/api/namespacemenu/#menu) or [`Submenu`](/references/javascript/api/namespacemenu/#submenu) and contains only text.
#### Extends
@@ -1583,29 +1486,25 @@ A menu item inside a [`Menu`](/references/javascript/api/namespaces/menu.md#menu
#### Properties
-| Property | Modifier | Type | Inherited from |
-| :--------------------------------------- | :-------- | :------- | :------------------ |
-| <a id="#rid-3" name="#rid-3"></a> `#rid` | `private` | `number` | `MenuItemBase.#rid` |
+| Property | Type |
+| :-------------------------------------------------------- | :------- |
+| `private` `readonly` <a id="#rid" name="#rid"></a> `#rid` | `number` |
#### Accessors
-<a id="id-3" name="id-3"></a>
-
##### id
```ts
get id(): string
```
-The id of this item.
-
-###### Returns
+**Source**: [menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
-`string`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
+MenuItemBase.id
-<a id="rid-3" name="rid-3"></a>
+---
##### rid
@@ -1613,20 +1512,18 @@ The id of this item.
get rid(): number
```
-###### Returns
+**Source**: [core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
-`number`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
+MenuItemBase.rid
#### Methods
-<a id="close-3" name="close-3"></a>
-
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -1634,36 +1531,36 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-`MenuItemBase.close`
+MenuItemBase.close
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
+**Source**: [core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
-<a id="isenabled-2" name="isenabled-2"></a>
+---
##### isEnabled()
```ts
-isEnabled(): Promise<boolean>
+isEnabled(): Promise< boolean >
```
Returns whether this menu item is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menuItem.ts:49](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L49)
+**Source**: [menu/menuItem.ts:49](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L49)
-<a id="setaccelerator-2" name="setaccelerator-2"></a>
+---
##### setAccelerator()
```ts
-setAccelerator(accelerator): Promise<void>
+setAccelerator(accelerator): Promise< void >
```
Sets the accelerator for this menu item.
@@ -1676,16 +1573,16 @@ Sets the accelerator for this menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menuItem.ts:63](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L63)
+**Source**: [menu/menuItem.ts:63](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L63)
-<a id="setenabled-2" name="setenabled-2"></a>
+---
##### setEnabled()
```ts
-setEnabled(enabled): Promise<void>
+setEnabled(enabled): Promise< void >
```
Sets whether this menu item is enabled or not.
@@ -1698,16 +1595,16 @@ Sets whether this menu item is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menuItem.ts:54](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L54)
+**Source**: [menu/menuItem.ts:54](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L54)
-<a id="settext-2" name="settext-2"></a>
+---
##### setText()
```ts
-setText(text): Promise<void>
+setText(text): Promise< void >
```
Sets the text for this menu item.
@@ -1720,52 +1617,50 @@ Sets the text for this menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menuItem.ts:40](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L40)
+**Source**: [menu/menuItem.ts:40](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L40)
-<a id="text-2" name="text-2"></a>
+---
##### text()
```ts
-text(): Promise<string>
+text(): Promise< string >
```
Returns the text of this menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menuItem.ts:35](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L35)
+**Source**: [menu/menuItem.ts:35](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L35)
-<a id="new-3" name="new-3"></a>
+---
##### new()
```ts
-static new(opts): Promise<MenuItem>
+static new(opts): Promise< MenuItem >
```
Create a new menu item.
###### Parameters
-| Parameter | Type |
-| :-------- | :--------------------------------------------------------------------------------- |
-| `opts` | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions) |
+| Parameter | Type |
+| :-------- | :----------------------------------------------------------------------------- |
+| `opts` | [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/menuItem.ts:30](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L30)
+**Source**: [menu/menuItem.ts:30](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/menuItem.ts#L30)
---
-<a id="predefinedmenuitem" name="predefinedmenuitem"></a>
-
### PredefinedMenuItem
A predefined (native) menu item which has a predefined behavior by the OS or by tauri.
@@ -1776,29 +1671,25 @@ A predefined (native) menu item which has a predefined behavior by the OS or by
#### Properties
-| Property | Modifier | Type | Inherited from |
-| :--------------------------------------- | :-------- | :------- | :------------------ |
-| <a id="#rid-4" name="#rid-4"></a> `#rid` | `private` | `number` | `MenuItemBase.#rid` |
+| Property | Type |
+| :-------------------------------------------------------- | :------- |
+| `private` `readonly` <a id="#rid" name="#rid"></a> `#rid` | `number` |
#### Accessors
-<a id="id-4" name="id-4"></a>
-
##### id
```ts
get id(): string
```
-The id of this item.
-
-###### Returns
+**Source**: [menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
-`string`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
+MenuItemBase.id
-<a id="rid-4" name="rid-4"></a>
+---
##### rid
@@ -1806,20 +1697,18 @@ The id of this item.
get rid(): number
```
-###### Returns
+**Source**: [core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
-`number`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
+MenuItemBase.rid
#### Methods
-<a id="close-4" name="close-4"></a>
-
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -1827,20 +1716,20 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-`MenuItemBase.close`
+MenuItemBase.close
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
+**Source**: [core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
-<a id="settext-3" name="settext-3"></a>
+---
##### setText()
```ts
-setText(text): Promise<void>
+setText(text): Promise< void >
```
Sets the text for this predefined menu item.
@@ -1853,55 +1742,53 @@ Sets the text for this predefined menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/predefinedMenuItem.ts:132](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/predefinedMenuItem.ts#L132)
+**Source**: [menu/predefinedMenuItem.ts:132](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/predefinedMenuItem.ts#L132)
-<a id="text-3" name="text-3"></a>
+---
##### text()
```ts
-text(): Promise<string>
+text(): Promise< string >
```
Returns the text of this predefined menu item.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/predefinedMenuItem.ts:127](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/predefinedMenuItem.ts#L127)
+**Source**: [menu/predefinedMenuItem.ts:127](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/predefinedMenuItem.ts#L127)
-<a id="new-4" name="new-4"></a>
+---
##### new()
```ts
-static new(opts?): Promise<PredefinedMenuItem>
+static new(opts?): Promise< PredefinedMenuItem >
```
Create a new predefined menu item.
###### Parameters
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------------------- |
-| `opts`? | [`PredefinedMenuItemOptions`](/references/javascript/api/namespaces/menu.md#predefinedmenuitemoptions) |
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------------------- |
+| `opts`? | [`PredefinedMenuItemOptions`](/references/javascript/api/namespacemenu/#predefinedmenuitemoptions) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/predefinedMenuItem.ts:118](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/predefinedMenuItem.ts#L118)
+**Source**: [menu/predefinedMenuItem.ts:118](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/predefinedMenuItem.ts#L118)
---
-<a id="submenu" name="submenu"></a>
-
### Submenu
-A type that is a submenu inside a [`Menu`](/references/javascript/api/namespaces/menu.md#menu) or [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu).
+A type that is a submenu inside a [`Menu`](/references/javascript/api/namespacemenu/#menu) or [`Submenu`](/references/javascript/api/namespacemenu/#submenu).
#### Extends
@@ -1909,29 +1796,25 @@ A type that is a submenu inside a [`Menu`](/references/javascript/api/namespaces
#### Properties
-| Property | Modifier | Type | Inherited from |
-| :--------------------------------------- | :-------- | :------- | :------------------ |
-| <a id="#rid-5" name="#rid-5"></a> `#rid` | `private` | `number` | `MenuItemBase.#rid` |
+| Property | Type |
+| :-------------------------------------------------------- | :------- |
+| `private` `readonly` <a id="#rid" name="#rid"></a> `#rid` | `number` |
#### Accessors
-<a id="id-5" name="id-5"></a>
-
##### id
```ts
get id(): string
```
-The id of this item.
+**Source**: [menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
-###### Returns
-
-`string`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/base.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/base.ts#L108)
+MenuItemBase.id
-<a id="rid-5" name="rid-5"></a>
+---
##### rid
@@ -1939,44 +1822,31 @@ The id of this item.
get rid(): number
```
-###### Returns
+**Source**: [core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
-`number`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
+MenuItemBase.rid
#### Methods
-<a id="append-1" name="append-1"></a>
-
##### append()
```ts
-append<T>(items): Promise<void>
+append<T>(items): Promise< void >
```
Add a menu item to the end of this submenu.
## Platform-spcific:
-- **macOS:** Only [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)s can be added to a [`Menu`](/references/javascript/api/namespaces/menu.md#menu).
+- **macOS:** Only [`Submenu`](/references/javascript/api/namespacemenu/#submenu)s can be added to a [`Menu`](/references/javascript/api/namespacemenu/#menu).
###### Type parameters
-| Type parameter |
-| :------------- |
-
-| `T` _extends_
-\| [`CheckMenuItemOptions`](/references/javascript/api/namespaces/menu.md#checkmenuitemoptions)
-\| [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions)
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItemOptions`](/references/javascript/api/namespaces/menu.md#iconmenuitemoptions)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItemOptions`](/references/javascript/api/namespaces/menu.md#predefinedmenuitemoptions)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`SubmenuOptions`](/references/javascript/api/namespaces/menu.md#submenuoptions)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem) |
+| Parameter |
+| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `T` _extends_ [`CheckMenuItemOptions`](/references/javascript/api/namespacemenu/#checkmenuitemoptions) \| [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions) \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItemOptions`](/references/javascript/api/namespacemenu/#iconmenuitemoptions) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItemOptions`](/references/javascript/api/namespacemenu/#predefinedmenuitemoptions) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`SubmenuOptions`](/references/javascript/api/namespacemenu/#submenuoptions) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) |
###### Parameters
@@ -1986,16 +1856,16 @@ Add a menu item to the end of this submenu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:97](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L97)
+**Source**: [menu/submenu.ts:97](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L97)
-<a id="close-5" name="close-5"></a>
+---
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -2003,26 +1873,20 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-`MenuItemBase.close`
+MenuItemBase.close
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
+**Source**: [core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
-<a id="get-1" name="get-1"></a>
+---
##### get()
```ts
-get(id): Promise<
- | null
- | CheckMenuItem
- | IconMenuItem
- | PredefinedMenuItem
- | Submenu
-| MenuItem>
+get(id): Promise< null | CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem >
```
Retrieves the menu item matching the given identifier.
@@ -2035,46 +1899,29 @@ Retrieves the menu item matching the given identifier.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<
-\| `null`
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:220](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L220)
+**Source**: [menu/submenu.ts:220](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L220)
-<a id="insert-1" name="insert-1"></a>
+---
##### insert()
```ts
-insert<T>(items, position): Promise<void>
+insert<T>(items, position): Promise< void >
```
Add a menu item to the specified position in this submenu.
## Platform-spcific:
-- **macOS:** Only [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)s can be added to a [`Menu`](/references/javascript/api/namespaces/menu.md#menu).
+- **macOS:** Only [`Submenu`](/references/javascript/api/namespacemenu/#submenu)s can be added to a [`Menu`](/references/javascript/api/namespacemenu/#menu).
###### Type parameters
-| Type parameter |
-| :------------- |
-
-| `T` _extends_
-\| [`CheckMenuItemOptions`](/references/javascript/api/namespaces/menu.md#checkmenuitemoptions)
-\| [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions)
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItemOptions`](/references/javascript/api/namespaces/menu.md#iconmenuitemoptions)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItemOptions`](/references/javascript/api/namespaces/menu.md#predefinedmenuitemoptions)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`SubmenuOptions`](/references/javascript/api/namespaces/menu.md#submenuoptions)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem) |
+| Parameter |
+| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `T` _extends_ [`CheckMenuItemOptions`](/references/javascript/api/namespacemenu/#checkmenuitemoptions) \| [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions) \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItemOptions`](/references/javascript/api/namespacemenu/#iconmenuitemoptions) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItemOptions`](/references/javascript/api/namespacemenu/#predefinedmenuitemoptions) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`SubmenuOptions`](/references/javascript/api/namespacemenu/#submenuoptions) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) |
###### Parameters
@@ -2085,58 +1932,48 @@ Add a menu item to the specified position in this submenu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:155](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L155)
+**Source**: [menu/submenu.ts:155](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L155)
-<a id="isenabled-3" name="isenabled-3"></a>
+---
##### isEnabled()
```ts
-isEnabled(): Promise<boolean>
+isEnabled(): Promise< boolean >
```
Returns whether this submenu is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:77](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L77)
+**Source**: [menu/submenu.ts:77](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L77)
-<a id="items-1" name="items-1"></a>
+---
##### items()
```ts
-items(): Promise<(
- | CheckMenuItem
- | IconMenuItem
- | PredefinedMenuItem
- | Submenu
-| MenuItem)[]>
+items(): Promise< (CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem)[] >
```
Returns a list of menu items that has been added to this submenu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<(
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem))[]\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< ([`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem))[] \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:208](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L208)
+**Source**: [menu/submenu.ts:208](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L208)
-<a id="popup-1" name="popup-1"></a>
+---
##### popup()
```ts
-popup(at?, window?): Promise<void>
+popup(at?, window?): Promise< void >
```
Popup this submenu as a context menu on the specified window.
@@ -2145,47 +1982,36 @@ If the position, is provided, it is relative to the window's top-left corner.
###### Parameters
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `at`? | [`LogicalPosition`](/references/javascript/api/namespaces/dpi.md#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition) |
-| `window`? | [`Window`](/references/javascript/api/namespaces/window.md#window) |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `at`? | [`LogicalPosition`](/references/javascript/api/namespacedpi/#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) |
+| `window`? | [`Window`](/references/javascript/api/namespacewindow/#window) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:242](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L242)
+**Source**: [menu/submenu.ts:242](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L242)
-<a id="prepend-1" name="prepend-1"></a>
+---
##### prepend()
```ts
-prepend<T>(items): Promise<void>
+prepend<T>(items): Promise< void >
```
Add a menu item to the beginning of this submenu.
## Platform-spcific:
-- **macOS:** Only [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)s can be added to a [`Menu`](/references/javascript/api/namespaces/menu.md#menu).
+- **macOS:** Only [`Submenu`](/references/javascript/api/namespacemenu/#submenu)s can be added to a [`Menu`](/references/javascript/api/namespacemenu/#menu).
###### Type parameters
-| Type parameter |
-| :------------- |
-
-| `T` _extends_
-\| [`CheckMenuItemOptions`](/references/javascript/api/namespaces/menu.md#checkmenuitemoptions)
-\| [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions)
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItemOptions`](/references/javascript/api/namespaces/menu.md#iconmenuitemoptions)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItemOptions`](/references/javascript/api/namespaces/menu.md#predefinedmenuitemoptions)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`SubmenuOptions`](/references/javascript/api/namespaces/menu.md#submenuoptions)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem) |
+| Parameter |
+| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `T` _extends_ [`CheckMenuItemOptions`](/references/javascript/api/namespacemenu/#checkmenuitemoptions) \| [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions) \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItemOptions`](/references/javascript/api/namespacemenu/#iconmenuitemoptions) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItemOptions`](/references/javascript/api/namespacemenu/#predefinedmenuitemoptions) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`SubmenuOptions`](/references/javascript/api/namespacemenu/#submenuoptions) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) |
###### Parameters
@@ -2195,44 +2021,38 @@ Add a menu item to the beginning of this submenu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:126](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L126)
+**Source**: [menu/submenu.ts:126](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L126)
-<a id="remove-2" name="remove-2"></a>
+---
##### remove()
```ts
-remove(item): Promise<void>
+remove(item): Promise< void >
```
Remove a menu item from this submenu.
###### Parameters
-| Parameter | Type |
-| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `item` | \| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu) \| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem) |
+| Parameter | Type |
+| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `item` | [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:179](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L179)
+**Source**: [menu/submenu.ts:179](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L179)
-<a id="removeat-1" name="removeat-1"></a>
+---
##### removeAt()
```ts
-removeAt(position): Promise<
- | null
- | CheckMenuItem
- | IconMenuItem
- | PredefinedMenuItem
- | Submenu
-| MenuItem>
+removeAt(position): Promise< null | CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem >
```
Remove a menu item from this submenu at the specified position.
@@ -2245,22 +2065,16 @@ Remove a menu item from this submenu at the specified position.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<
-\| `null`
-\| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem)
-\| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem)
-\| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem)
-\| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)
-\| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:190](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L190)
+**Source**: [menu/submenu.ts:190](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L190)
-<a id="setashelpmenufornsapp" name="setashelpmenufornsapp"></a>
+---
##### setAsHelpMenuForNSApp()
```ts
-setAsHelpMenuForNSApp(): Promise<void>
+setAsHelpMenuForNSApp(): Promise< void >
```
Set this submenu as the Help menu for the application on macOS.
@@ -2276,16 +2090,16 @@ which has a title matching the localized word "Help".
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:290](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L290)
+**Source**: [menu/submenu.ts:290](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L290)
-<a id="setaswindowsmenufornsapp" name="setaswindowsmenufornsapp"></a>
+---
##### setAsWindowsMenuForNSApp()
```ts
-setAsWindowsMenuForNSApp(): Promise<void>
+setAsWindowsMenuForNSApp(): Promise< void >
```
Set this submenu as the Window menu for the application on macOS.
@@ -2299,16 +2113,16 @@ certain other items to the menu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:272](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L272)
+**Source**: [menu/submenu.ts:272](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L272)
-<a id="setenabled-3" name="setenabled-3"></a>
+---
##### setEnabled()
```ts
-setEnabled(enabled): Promise<void>
+setEnabled(enabled): Promise< void >
```
Sets whether this submenu is enabled or not.
@@ -2321,16 +2135,16 @@ Sets whether this submenu is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:82](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L82)
+**Source**: [menu/submenu.ts:82](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L82)
-<a id="settext-4" name="settext-4"></a>
+---
##### setText()
```ts
-setText(text): Promise<void>
+setText(text): Promise< void >
```
Sets the text for this submenu.
@@ -2343,179 +2157,165 @@ Sets the text for this submenu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:68](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L68)
+**Source**: [menu/submenu.ts:68](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L68)
-<a id="text-4" name="text-4"></a>
+---
##### text()
```ts
-text(): Promise<string>
+text(): Promise< string >
```
Returns the text of this submenu.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:63](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L63)
+**Source**: [menu/submenu.ts:63](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L63)
-<a id="new-5" name="new-5"></a>
+---
##### new()
```ts
-static new(opts): Promise<Submenu>
+static new(opts): Promise< Submenu >
```
Create a new submenu.
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------- |
-| `opts` | [`SubmenuOptions`](/references/javascript/api/namespaces/menu.md#submenuoptions) |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------- |
+| `opts` | [`SubmenuOptions`](/references/javascript/api/namespacemenu/#submenuoptions) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Submenu`](/references/javascript/api/namespaces/menu.md#submenu)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:58](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L58)
+**Source**: [menu/submenu.ts:58](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L58)
## Interfaces
-<a id="aboutmetadata" name="aboutmetadata"></a>
-
### AboutMetadata
A metadata for the about predefined menu item.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="authors" name="authors"></a> `authors?` | `string`[] | The authors of the application.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
-| <a id="comments" name="comments"></a> `comments?` | `string` | Application comments.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
-| <a id="copyright" name="copyright"></a> `copyright?` | `string` | The copyright of the application. |
-| <a id="credits" name="credits"></a> `credits?` | `string` | The credits.<br /><br />#### Platform-specific<br /><br />- **Windows / Linux:** Unsupported. |
-| <a id="icon" name="icon"></a> `icon?` | \| `string` \| `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaces/image.md#image) | The application icon.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-| <a id="license" name="license"></a> `license?` | `string` | The license of the application.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
-| <a id="name" name="name"></a> `name?` | `string` | Sets the application name. |
-| <a id="shortversion" name="shortversion"></a> `shortVersion?` | `string` | The short version, e.g. "1.0".<br /><br />#### Platform-specific<br /><br />- **Windows / Linux:** Appended to the end of `version` in parentheses. |
-| <a id="version" name="version"></a> `version?` | `string` | The application version. |
-| <a id="website" name="website"></a> `website?` | `string` | The application website.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
-| <a id="websitelabel" name="websitelabel"></a> `websiteLabel?` | `string` | The website label.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
+| Property | Type | Description |
+| :------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="authors" name="authors"></a> `authors`? | `string`[] | The authors of the application.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
+| <a id="comments" name="comments"></a> `comments`? | `string` | Application comments.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
+| <a id="copyright" name="copyright"></a> `copyright`? | `string` | The copyright of the application. |
+| <a id="credits" name="credits"></a> `credits`? | `string` | The credits.<br /><br />#### Platform-specific<br /><br />- **Windows / Linux:** Unsupported. |
+| <a id="icon" name="icon"></a> `icon`? | `string` \| `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaceimage/#image) | The application icon.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+| <a id="license" name="license"></a> `license`? | `string` | The license of the application.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
+| <a id="name" name="name"></a> `name`? | `string` | Sets the application name. |
+| <a id="shortversion" name="shortversion"></a> `shortVersion`? | `string` | The short version, e.g. "1.0".<br /><br />#### Platform-specific<br /><br />- **Windows / Linux:** Appended to the end of `version` in parentheses. |
+| <a id="version" name="version"></a> `version`? | `string` | The application version. |
+| <a id="website" name="website"></a> `website`? | `string` | The application website.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
+| <a id="websitelabel" name="websitelabel"></a> `websiteLabel`? | `string` | The website label.<br /><br />#### Platform-specific<br /><br />- **macOS:** Unsupported. |
---
-<a id="checkmenuitemoptions" name="checkmenuitemoptions"></a>
-
### CheckMenuItemOptions
Options for creating a new check menu item.
#### Extends
-- [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions)
+- [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions)
#### Properties
-| Property | Type | Description | Inherited from |
-| :--------------------------------------------------------- | :------------------------- | :--------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="accelerator" name="accelerator"></a> `accelerator?` | `string` | Specify an accelerator for the new menu item. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`accelerator`](/references/javascript/api/namespaces/menu.md#accelerator-2) |
-| <a id="action" name="action"></a> `action?` | (`id`: `string`) => `void` | Specify a handler to be called when this menu item is activated. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`action`](/references/javascript/api/namespaces/menu.md#action-2) |
-| <a id="checked" name="checked"></a> `checked?` | `boolean` | Whether the new check menu item is enabled or not. | - |
-| <a id="enabled" name="enabled"></a> `enabled?` | `boolean` | Whether the new menu item is enabled or not. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`enabled`](/references/javascript/api/namespaces/menu.md#enabled-2) |
-| <a id="id-6" name="id-6"></a> `id?` | `string` | Specify an id to use for the new menu item. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`id`](/references/javascript/api/namespaces/menu.md#id-8) |
-| <a id="text-5" name="text-5"></a> `text` | `string` | The text of the new menu item. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`text`](/references/javascript/api/namespaces/menu.md#text-7) |
+| Property | Type | Description |
+| :--------------------------------------------------------- | :--------------- | :------------------------------------------------- |
+| <a id="accelerator" name="accelerator"></a> `accelerator`? | `string` | Specify an accelerator for the new menu item. |
+| <a id="action" name="action"></a> `action`? | (`id`) => `void` | - |
+| <a id="checked" name="checked"></a> `checked`? | `boolean` | Whether the new check menu item is enabled or not. |
+| <a id="enabled" name="enabled"></a> `enabled`? | `boolean` | Whether the new menu item is enabled or not. |
+| <a id="id" name="id"></a> `id`? | `string` | Specify an id to use for the new menu item. |
+| <a id="text" name="text"></a> `text` | `string` | The text of the new menu item. |
---
-<a id="iconmenuitemoptions" name="iconmenuitemoptions"></a>
-
### IconMenuItemOptions
Options for creating a new icon menu item.
#### Extends
-- [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions)
+- [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions)
#### Properties
-| Property | Type | Description | Inherited from |
-| :------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="accelerator-1" name="accelerator-1"></a> `accelerator?` | `string` | Specify an accelerator for the new menu item. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`accelerator`](/references/javascript/api/namespaces/menu.md#accelerator-2) |
-| <a id="action-1" name="action-1"></a> `action?` | (`id`: `string`) => `void` | Specify a handler to be called when this menu item is activated. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`action`](/references/javascript/api/namespaces/menu.md#action-2) |
-| <a id="enabled-1" name="enabled-1"></a> `enabled?` | `boolean` | Whether the new menu item is enabled or not. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`enabled`](/references/javascript/api/namespaces/menu.md#enabled-2) |
-| <a id="icon-1" name="icon-1"></a> `icon?` | \| `string` \| `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaces/image.md#image) | Icon to be used for the new icon menu item. | - |
-| <a id="id-7" name="id-7"></a> `id?` | `string` | Specify an id to use for the new menu item. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`id`](/references/javascript/api/namespaces/menu.md#id-8) |
-| <a id="text-6" name="text-6"></a> `text` | `string` | The text of the new menu item. | [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions).[`text`](/references/javascript/api/namespaces/menu.md#text-7) |
+| Property | Type | Description |
+| :--------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------- |
+| <a id="accelerator" name="accelerator"></a> `accelerator`? | `string` | Specify an accelerator for the new menu item. |
+| <a id="action" name="action"></a> `action`? | (`id`) => `void` | - |
+| <a id="enabled" name="enabled"></a> `enabled`? | `boolean` | Whether the new menu item is enabled or not. |
+| <a id="icon" name="icon"></a> `icon`? | `string` \| `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaceimage/#image) | Icon to be used for the new icon menu item. |
+| <a id="id" name="id"></a> `id`? | `string` | Specify an id to use for the new menu item. |
+| <a id="text" name="text"></a> `text` | `string` | The text of the new menu item. |
---
-<a id="menuitemoptions" name="menuitemoptions"></a>
-
### MenuItemOptions
Options for creating a new menu item.
-#### Extended by
+#### Extended By
-- [`CheckMenuItemOptions`](/references/javascript/api/namespaces/menu.md#checkmenuitemoptions)
-- [`IconMenuItemOptions`](/references/javascript/api/namespaces/menu.md#iconmenuitemoptions)
+- [`CheckMenuItemOptions`](/references/javascript/api/namespacemenu/#checkmenuitemoptions)
+- [`IconMenuItemOptions`](/references/javascript/api/namespacemenu/#iconmenuitemoptions)
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------------------- | :------------------------- | :--------------------------------------------------------------- |
-| <a id="accelerator-2" name="accelerator-2"></a> `accelerator?` | `string` | Specify an accelerator for the new menu item. |
-| <a id="action-2" name="action-2"></a> `action?` | (`id`: `string`) => `void` | Specify a handler to be called when this menu item is activated. |
-| <a id="enabled-2" name="enabled-2"></a> `enabled?` | `boolean` | Whether the new menu item is enabled or not. |
-| <a id="id-8" name="id-8"></a> `id?` | `string` | Specify an id to use for the new menu item. |
-| <a id="text-7" name="text-7"></a> `text` | `string` | The text of the new menu item. |
+| Property | Type | Description |
+| :--------------------------------------------------------- | :--------------- | :-------------------------------------------- |
+| <a id="accelerator" name="accelerator"></a> `accelerator`? | `string` | Specify an accelerator for the new menu item. |
+| <a id="action" name="action"></a> `action`? | (`id`) => `void` | - |
+| <a id="enabled" name="enabled"></a> `enabled`? | `boolean` | Whether the new menu item is enabled or not. |
+| <a id="id" name="id"></a> `id`? | `string` | Specify an id to use for the new menu item. |
+| <a id="text" name="text"></a> `text` | `string` | The text of the new menu item. |
---
-<a id="menuoptions" name="menuoptions"></a>
-
### MenuOptions
Options for creating a new menu.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------- |
-| <a id="id-9" name="id-9"></a> `id?` | `string` | Specify an id to use for the new menu. |
-| <a id="items-2" name="items-2"></a> `items?` | ( \| [`CheckMenuItemOptions`](/references/javascript/api/namespaces/menu.md#checkmenuitemoptions) \| [`MenuItemOptions`](/references/javascript/api/namespaces/menu.md#menuitemoptions) \| [`CheckMenuItem`](/references/javascript/api/namespaces/menu.md#checkmenuitem) \| [`IconMenuItemOptions`](/references/javascript/api/namespaces/menu.md#iconmenuitemoptions) \| [`IconMenuItem`](/references/javascript/api/namespaces/menu.md#iconmenuitem) \| [`PredefinedMenuItemOptions`](/references/javascript/api/namespaces/menu.md#predefinedmenuitemoptions) \| [`PredefinedMenuItem`](/references/javascript/api/namespaces/menu.md#predefinedmenuitem) \| [`SubmenuOptions`](/references/javascript/api/namespaces/menu.md#submenuoptions) \| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu) \| [`MenuItem`](/references/javascript/api/namespaces/menu.md#menuitem))[] | List of items to add to the new menu. |
+| Property | Type | Description |
+| :--------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------- |
+| <a id="id" name="id"></a> `id`? | `string` | Specify an id to use for the new menu. |
+| <a id="items" name="items"></a> `items`? | ([`CheckMenuItemOptions`](/references/javascript/api/namespacemenu/#checkmenuitemoptions) \| [`MenuItemOptions`](/references/javascript/api/namespacemenu/#menuitemoptions) \| [`CheckMenuItem`](/references/javascript/api/namespacemenu/#checkmenuitem) \| [`IconMenuItemOptions`](/references/javascript/api/namespacemenu/#iconmenuitemoptions) \| [`IconMenuItem`](/references/javascript/api/namespacemenu/#iconmenuitem) \| [`PredefinedMenuItemOptions`](/references/javascript/api/namespacemenu/#predefinedmenuitemoptions) \| [`PredefinedMenuItem`](/references/javascript/api/namespacemenu/#predefinedmenuitem) \| [`SubmenuOptions`](/references/javascript/api/namespacemenu/#submenuoptions) \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`MenuItem`](/references/javascript/api/namespacemenu/#menuitem))[] | List of items to add to the new menu. |
---
-<a id="predefinedmenuitemoptions" name="predefinedmenuitemoptions"></a>
-
### PredefinedMenuItemOptions
Options for creating a new predefined menu item.
#### Properties
-| Property | Type | Description |
-| :---------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------- |
-| <a id="item" name="item"></a> `item` | \| `object` \| `"Separator"` \| `"Copy"` \| `"Cut"` \| `"Paste"` \| `"SelectAll"` \| `"Undo"` \| `"Redo"` \| `"Minimize"` \| `"Maximize"` \| `"Fullscreen"` \| `"Hide"` \| `"HideOthers"` \| `"ShowAll"` \| `"CloseWindow"` \| `"Quit"` \| `"Services"` | The predefined item type |
-| <a id="text-8" name="text-8"></a> `text?` | `string` | The text of the new predefined menu item. |
+| Property | Type | Description |
+| :------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------- |
+| <a id="item" name="item"></a> `item` | \{`About`: `null` \| [`AboutMetadata`](/references/javascript/api/namespacemenu/#aboutmetadata);} \| `"Separator"` \| `"Copy"` \| `"Cut"` \| `"Paste"` \| `"SelectAll"` \| `"Undo"` \| `"Redo"` \| `"Minimize"` \| `"Maximize"` \| `"Fullscreen"` \| `"Hide"` \| `"HideOthers"` \| `"ShowAll"` \| `"CloseWindow"` \| `"Quit"` \| `"Services"` | The predefined item type |
+| <a id="text" name="text"></a> `text`? | `string` | The text of the new predefined menu item. |
## Type Aliases
-<a id="submenuoptions" name="submenuoptions"></a>
-
### SubmenuOptions
```ts
-type SubmenuOptions: Omit<MenuItemOptions, "accelerator" | "action"> & MenuOptions;
+SubmenuOptions: Omit<MenuItemOptions, 'accelerator' | 'action'> & MenuOptions;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/menu/submenu.ts:47](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L47)
+**Source**: [menu/submenu.ts:47](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/menu/submenu.ts#L47)
diff --git a/src/content/docs/references/javascript/api/Namespace.path.md b/src/content/docs/references/javascript/api/Namespace.path.md
index 08b85c15..0512def2 100644
--- a/src/content/docs/references/javascript/api/Namespace.path.md
+++ b/src/content/docs/references/javascript/api/Namespace.path.md
@@ -13,8 +13,6 @@ It is recommended to allowlist only the APIs you use for optimal bundle size and
## Enumerations
-<a id="basedirectory" name="basedirectory"></a>
-
### BaseDirectory
#### Since
@@ -23,17 +21,15 @@ It is recommended to allowlist only the APIs you use for optimal bundle size and
#### Enumeration Members
-<a id="appcache" name="appcache"></a>
-
##### AppCache
```ts
AppCache: 16;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:35](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L35)
+**Source**: [path.ts:35](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L35)
-<a id="appconfig" name="appconfig"></a>
+---
##### AppConfig
@@ -41,9 +37,9 @@ AppCache: 16;
AppConfig: 13;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:32](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L32)
+**Source**: [path.ts:32](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L32)
-<a id="appdata" name="appdata"></a>
+---
##### AppData
@@ -51,9 +47,9 @@ AppConfig: 13;
AppData: 14;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:33](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L33)
+**Source**: [path.ts:33](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L33)
-<a id="applocaldata" name="applocaldata"></a>
+---
##### AppLocalData
@@ -61,9 +57,9 @@ AppData: 14;
AppLocalData: 15;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:34](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L34)
+**Source**: [path.ts:34](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L34)
-<a id="applog" name="applog"></a>
+---
##### AppLog
@@ -71,9 +67,9 @@ AppLocalData: 15;
AppLog: 17;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:36](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L36)
+**Source**: [path.ts:36](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L36)
-<a id="audio" name="audio"></a>
+---
##### Audio
@@ -81,9 +77,9 @@ AppLog: 17;
Audio: 1;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:20](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L20)
+**Source**: [path.ts:20](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L20)
-<a id="cache" name="cache"></a>
+---
##### Cache
@@ -91,9 +87,9 @@ Audio: 1;
Cache: 2;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:21](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L21)
+**Source**: [path.ts:21](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L21)
-<a id="config" name="config"></a>
+---
##### Config
@@ -101,9 +97,9 @@ Cache: 2;
Config: 3;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:22](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L22)
+**Source**: [path.ts:22](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L22)
-<a id="data" name="data"></a>
+---
##### Data
@@ -111,9 +107,9 @@ Config: 3;
Data: 4;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:23](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L23)
+**Source**: [path.ts:23](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L23)
-<a id="desktop" name="desktop"></a>
+---
##### Desktop
@@ -121,9 +117,9 @@ Data: 4;
Desktop: 18;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:38](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L38)
+**Source**: [path.ts:38](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L38)
-<a id="document" name="document"></a>
+---
##### Document
@@ -131,9 +127,9 @@ Desktop: 18;
Document: 6;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:25](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L25)
+**Source**: [path.ts:25](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L25)
-<a id="download" name="download"></a>
+---
##### Download
@@ -141,9 +137,9 @@ Document: 6;
Download: 7;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:26](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L26)
+**Source**: [path.ts:26](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L26)
-<a id="executable" name="executable"></a>
+---
##### Executable
@@ -151,9 +147,9 @@ Download: 7;
Executable: 19;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:39](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L39)
+**Source**: [path.ts:39](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L39)
-<a id="font" name="font"></a>
+---
##### Font
@@ -161,9 +157,9 @@ Executable: 19;
Font: 20;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:40](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L40)
+**Source**: [path.ts:40](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L40)
-<a id="home" name="home"></a>
+---
##### Home
@@ -171,9 +167,9 @@ Font: 20;
Home: 21;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:41](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L41)
+**Source**: [path.ts:41](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L41)
-<a id="localdata" name="localdata"></a>
+---
##### LocalData
@@ -181,9 +177,9 @@ Home: 21;
LocalData: 5;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:24](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L24)
+**Source**: [path.ts:24](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L24)
-<a id="picture" name="picture"></a>
+---
##### Picture
@@ -191,9 +187,9 @@ LocalData: 5;
Picture: 8;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:27](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L27)
+**Source**: [path.ts:27](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L27)
-<a id="public" name="public"></a>
+---
##### Public
@@ -201,9 +197,9 @@ Picture: 8;
Public: 9;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:28](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L28)
+**Source**: [path.ts:28](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L28)
-<a id="resource" name="resource"></a>
+---
##### Resource
@@ -211,9 +207,9 @@ Public: 9;
Resource: 11;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:30](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L30)
+**Source**: [path.ts:30](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L30)
-<a id="runtime" name="runtime"></a>
+---
##### Runtime
@@ -221,9 +217,9 @@ Resource: 11;
Runtime: 22;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:42](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L42)
+**Source**: [path.ts:42](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L42)
-<a id="temp" name="temp"></a>
+---
##### Temp
@@ -231,9 +227,9 @@ Runtime: 22;
Temp: 12;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:31](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L31)
+**Source**: [path.ts:31](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L31)
-<a id="template" name="template"></a>
+---
##### Template
@@ -241,9 +237,9 @@ Temp: 12;
Template: 23;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:43](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L43)
+**Source**: [path.ts:43](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L43)
-<a id="video" name="video"></a>
+---
##### Video
@@ -251,25 +247,19 @@ Template: 23;
Video: 10;
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:29](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L29)
+**Source**: [path.ts:29](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L29)
## Functions
-<a id="appcachedir" name="appcachedir"></a>
-
### appCacheDir()
```ts
-function appCacheDir(): Promise<string>;
+appCacheDir(): Promise< string >
```
Returns the path to the suggested directory for your app's cache files.
Resolves to `${cacheDir}/${bundleIdentifier}`, where `bundleIdentifier` is the value [`tauri.bundle.identifier`](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in `tauri.conf.json`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -281,25 +271,23 @@ const appCacheDirPath = await appCacheDir();
1.2.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L108)
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
----
+**Source**: [path.ts:108](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L108)
-<a id="appconfigdir" name="appconfigdir"></a>
+---
### appConfigDir()
```ts
-function appConfigDir(): Promise<string>;
+appConfigDir(): Promise< string >
```
Returns the path to the suggested directory for your app's config files.
Resolves to `${configDir}/${bundleIdentifier}`, where `bundleIdentifier` is the value [`tauri.bundle.identifier`](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in `tauri.conf.json`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -311,25 +299,23 @@ const appConfigDirPath = await appConfigDir();
1.2.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L57)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L57)
-<a id="appdatadir" name="appdatadir"></a>
+---
### appDataDir()
```ts
-function appDataDir(): Promise<string>;
+appDataDir(): Promise< string >
```
Returns the path to the suggested directory for your app's data files.
Resolves to `${dataDir}/${bundleIdentifier}`, where `bundleIdentifier` is the value [`tauri.bundle.identifier`](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in `tauri.conf.json`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -341,25 +327,23 @@ const appDataDirPath = await appDataDir();
1.2.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:74](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L74)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="applocaldatadir" name="applocaldatadir"></a>
+**Source**: [path.ts:74](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L74)
+
+---
### appLocalDataDir()
```ts
-function appLocalDataDir(): Promise<string>;
+appLocalDataDir(): Promise< string >
```
Returns the path to the suggested directory for your app's local data files.
Resolves to `${localDataDir}/${bundleIdentifier}`, where `bundleIdentifier` is the value [`tauri.bundle.identifier`](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in `tauri.conf.json`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -371,16 +355,18 @@ const appLocalDataDirPath = await appLocalDataDir();
1.2.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:91](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L91)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:91](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L91)
-<a id="applogdir" name="applogdir"></a>
+---
### appLogDir()
```ts
-function appLogDir(): Promise<string>;
+appLogDir(): Promise< string >
```
Returns the path to the suggested directory for your app's log files.
@@ -391,10 +377,6 @@ Returns the path to the suggested directory for your app's log files.
- **macOS:** Resolves to `${homeDir}/Library/Logs/{bundleIdentifier}`
- **Windows:** Resolves to `${configDir}/${bundleIdentifier}/logs`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -406,16 +388,18 @@ const appLogDirPath = await appLogDir();
1.2.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:520](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L520)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="audiodir" name="audiodir"></a>
+**Source**: [path.ts:520](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L520)
+
+---
### audioDir()
```ts
-function audioDir(): Promise<string>;
+audioDir(): Promise< string >
```
Returns the path to the user's audio directory.
@@ -426,10 +410,6 @@ Returns the path to the user's audio directory.
- **macOS:** Resolves to `$HOME/Music`.
- **Windows:** Resolves to `{FOLDERID_Music}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -441,31 +421,22 @@ const audioDirPath = await audioDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:130](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L130)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:130](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L130)
-<a id="basename" name="basename"></a>
+---
### basename()
```ts
-function basename(path, ext?): Promise<string>;
+basename(path, ext?): Promise< string >
```
Returns the last portion of a `path`. Trailing directory separators are ignored.
-#### Parameters
-
-| Parameter | Type | Description |
-| :-------- | :------- | :--------------------------------------------------------------- |
-| `path` | `string` | - |
-| `ext`? | `string` | An optional file extension to be removed from the returned path. |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -478,16 +449,25 @@ assert(base === 'app.conf');
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:650](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L650)
+#### Parameters
----
+| Parameter | Type | Description |
+| :-------- | :------- | :--------------------------------------------------------------- |
+| `path` | `string` | - |
+| `ext`? | `string` | An optional file extension to be removed from the returned path. |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="cachedir" name="cachedir"></a>
+**Source**: [path.ts:650](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L650)
+
+---
### cacheDir()
```ts
-function cacheDir(): Promise<string>;
+cacheDir(): Promise< string >
```
Returns the path to the user's cache directory.
@@ -498,10 +478,6 @@ Returns the path to the user's cache directory.
- **macOS:** Resolves to `$HOME/Library/Caches`.
- **Windows:** Resolves to `{FOLDERID_LocalAppData}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -513,16 +489,18 @@ const cacheDirPath = await cacheDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:152](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L152)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:152](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L152)
-<a id="configdir" name="configdir"></a>
+---
### configDir()
```ts
-function configDir(): Promise<string>;
+configDir(): Promise< string >
```
Returns the path to the user's config directory.
@@ -533,10 +511,6 @@ Returns the path to the user's config directory.
- **macOS:** Resolves to `$HOME/Library/Application Support`.
- **Windows:** Resolves to `{FOLDERID_RoamingAppData}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -548,16 +522,18 @@ const configDirPath = await configDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:174](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L174)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="datadir" name="datadir"></a>
+**Source**: [path.ts:174](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L174)
+
+---
### dataDir()
```ts
-function dataDir(): Promise<string>;
+dataDir(): Promise< string >
```
Returns the path to the user's data directory.
@@ -568,10 +544,6 @@ Returns the path to the user's data directory.
- **macOS:** Resolves to `$HOME/Library/Application Support`.
- **Windows:** Resolves to `{FOLDERID_RoamingAppData}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -583,16 +555,18 @@ const dataDirPath = await dataDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:196](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L196)
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
----
+**Source**: [path.ts:196](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L196)
-<a id="delimiter" name="delimiter"></a>
+---
### delimiter()
```ts
-function delimiter(): string;
+delimiter(): string
```
Returns the platform-specific path segment delimiter:
@@ -600,24 +574,22 @@ Returns the platform-specific path segment delimiter:
- `;` on Windows
- `:` on POSIX
-#### Returns
-
-`string`
-
#### Since
2.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:560](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L560)
+#### Returns
----
+`string`
+
+**Source**: [path.ts:560](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L560)
-<a id="desktopdir" name="desktopdir"></a>
+---
### desktopDir()
```ts
-function desktopDir(): Promise<string>;
+desktopDir(): Promise< string >
```
Returns the path to the user's desktop directory.
@@ -628,10 +600,6 @@ Returns the path to the user's desktop directory.
- **macOS:** Resolves to `$HOME/Desktop`.
- **Windows:** Resolves to `{FOLDERID_Desktop}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -643,30 +611,22 @@ const desktopPath = await desktopDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:218](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L218)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="dirname" name="dirname"></a>
+**Source**: [path.ts:218](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L218)
+
+---
### dirname()
```ts
-function dirname(path): Promise<string>;
+dirname(path): Promise< string >
```
Returns the directory name of a `path`. Trailing directory separators are ignored.
-#### Parameters
-
-| Parameter | Type |
-| :-------- | :------- |
-| `path` | `string` |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -679,24 +639,28 @@ assert(dir === 'somedir');
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:619](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L619)
+#### Parameters
----
+| Parameter | Type |
+| :-------- | :------- |
+| `path` | `string` |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="documentdir" name="documentdir"></a>
+**Source**: [path.ts:619](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L619)
+
+---
### documentDir()
```ts
-function documentDir(): Promise<string>;
+documentDir(): Promise< string >
```
Returns the path to the user's document directory.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -714,16 +678,18 @@ const documentDirPath = await documentDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:240](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L240)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:240](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L240)
-<a id="downloaddir" name="downloaddir"></a>
+---
### downloadDir()
```ts
-function downloadDir(): Promise<string>;
+downloadDir(): Promise< string >
```
Returns the path to the user's download directory.
@@ -734,10 +700,6 @@ Returns the path to the user's download directory.
- **macOS**: Resolves to `$HOME/Downloads`.
- **Windows**: Resolves to `{FOLDERID_Downloads}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -749,16 +711,18 @@ const downloadDirPath = await downloadDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:262](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L262)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="executabledir" name="executabledir"></a>
+**Source**: [path.ts:262](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L262)
+
+---
### executableDir()
```ts
-function executableDir(): Promise<string>;
+executableDir(): Promise< string >
```
Returns the path to the user's executable directory.
@@ -769,10 +733,6 @@ Returns the path to the user's executable directory.
- **macOS:** Not supported.
- **Windows:** Not supported.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -784,30 +744,22 @@ const executableDirPath = await executableDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:284](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L284)
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
----
+**Source**: [path.ts:284](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L284)
-<a id="extname" name="extname"></a>
+---
### extname()
```ts
-function extname(path): Promise<string>;
+extname(path): Promise< string >
```
Returns the extension of the `path`.
-#### Parameters
-
-| Parameter | Type |
-| :-------- | :------- |
-| `path` | `string` |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -820,16 +772,24 @@ assert(ext === 'html');
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:634](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L634)
+#### Parameters
----
+| Parameter | Type |
+| :-------- | :------- |
+| `path` | `string` |
+
+#### Returns
-<a id="fontdir" name="fontdir"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:634](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L634)
+
+---
### fontDir()
```ts
-function fontDir(): Promise<string>;
+fontDir(): Promise< string >
```
Returns the path to the user's font directory.
@@ -840,10 +800,6 @@ Returns the path to the user's font directory.
- **macOS:** Resolves to `$HOME/Library/Fonts`.
- **Windows:** Not supported.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -855,16 +811,18 @@ const fontDirPath = await fontDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:306](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L306)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:306](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L306)
-<a id="homedir" name="homedir"></a>
+---
### homeDir()
```ts
-function homeDir(): Promise<string>;
+homeDir(): Promise< string >
```
Returns the path to the user's home directory.
@@ -875,10 +833,6 @@ Returns the path to the user's home directory.
- **macOS:** Resolves to `$HOME`.
- **Windows:** Resolves to `{FOLDERID_Profile}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -890,30 +844,22 @@ const homeDirPath = await homeDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:328](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L328)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="isabsolute" name="isabsolute"></a>
+**Source**: [path.ts:328](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L328)
+
+---
### isAbsolute()
```ts
-function isAbsolute(path): Promise<boolean>;
+isAbsolute(path): Promise< boolean >
```
Returns whether the path is absolute or not.
-#### Parameters
-
-| Parameter | Type |
-| :-------- | :------- |
-| `path` | `string` |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
#### Example
```typescript
@@ -925,30 +871,28 @@ assert(await isAbsolute('/home/tauri'));
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:664](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L664)
+#### Parameters
----
+| Parameter | Type |
+| :-------- | :------- |
+| `path` | `string` |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-<a id="join" name="join"></a>
+**Source**: [path.ts:664](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L664)
+
+---
### join()
```ts
-function join(...paths): Promise<string>;
+join(...paths): Promise< string >
```
Joins all given `path` segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.
-#### Parameters
-
-| Parameter | Type |
-| :--------- | :--------- |
-| ...`paths` | `string`[] |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -961,16 +905,24 @@ const path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:604](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L604)
+#### Parameters
----
+| Parameter | Type |
+| :--------- | :--------- |
+| ...`paths` | `string`[] |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:604](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L604)
-<a id="localdatadir" name="localdatadir"></a>
+---
### localDataDir()
```ts
-function localDataDir(): Promise<string>;
+localDataDir(): Promise< string >
```
Returns the path to the user's local data directory.
@@ -981,10 +933,6 @@ Returns the path to the user's local data directory.
- **macOS:** Resolves to `$HOME/Library/Application Support`.
- **Windows:** Resolves to `{FOLDERID_LocalAppData}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -996,30 +944,22 @@ const localDataDirPath = await localDataDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:350](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L350)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="normalize" name="normalize"></a>
+**Source**: [path.ts:350](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L350)
+
+---
### normalize()
```ts
-function normalize(path): Promise<string>;
+normalize(path): Promise< string >
```
Normalizes the given `path`, resolving `'..'` and `'.'` segments and resolve symbolic links.
-#### Parameters
-
-| Parameter | Type |
-| :-------- | :------- |
-| `path` | `string` |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -1032,16 +972,24 @@ const path = await normalize(`${appDataDirPath}/../users/tauri/avatar.png`);
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:589](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L589)
+#### Parameters
----
+| Parameter | Type |
+| :-------- | :------- |
+| `path` | `string` |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="picturedir" name="picturedir"></a>
+**Source**: [path.ts:589](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L589)
+
+---
### pictureDir()
```ts
-function pictureDir(): Promise<string>;
+pictureDir(): Promise< string >
```
Returns the path to the user's picture directory.
@@ -1052,10 +1000,6 @@ Returns the path to the user's picture directory.
- **macOS:** Resolves to `$HOME/Pictures`.
- **Windows:** Resolves to `{FOLDERID_Pictures}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -1067,16 +1011,18 @@ const pictureDirPath = await pictureDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:372](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L372)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:372](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L372)
-<a id="publicdir" name="publicdir"></a>
+---
### publicDir()
```ts
-function publicDir(): Promise<string>;
+publicDir(): Promise< string >
```
Returns the path to the user's public directory.
@@ -1087,10 +1033,6 @@ Returns the path to the user's public directory.
- **macOS:** Resolves to `$HOME/Public`.
- **Windows:** Resolves to `{FOLDERID_Public}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -1102,30 +1044,22 @@ const publicDirPath = await publicDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:394](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L394)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="resolve" name="resolve"></a>
+**Source**: [path.ts:394](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L394)
+
+---
### resolve()
```ts
-function resolve(...paths): Promise<string>;
+resolve(...paths): Promise< string >
```
Resolves a sequence of `paths` or `path` segments into an absolute path.
-#### Parameters
-
-| Parameter | Type |
-| :--------- | :--------- |
-| ...`paths` | `string`[] |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -1144,32 +1078,28 @@ const path = await resolve(
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:574](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L574)
+#### Parameters
----
+| Parameter | Type |
+| :--------- | :--------- |
+| ...`paths` | `string`[] |
+
+#### Returns
-<a id="resolveresource" name="resolveresource"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:574](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L574)
+
+---
### resolveResource()
```ts
-function resolveResource(resourcePath): Promise<string>;
+resolveResource(resourcePath): Promise< string >
```
Resolve the path to a resource file.
-#### Parameters
-
-| Parameter | Type | Description |
-| :------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `resourcePath` | `string` | The path to the resource.<br />Must follow the same syntax as defined in `tauri.conf.json > bundle > resources`, i.e. keeping subfolders and parent dir components (`../`). |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
-The full path to the resource.
-
#### Example
```typescript
@@ -1181,25 +1111,31 @@ const resourcePath = await resolveResource('script.sh');
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:431](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L431)
+#### Parameters
----
+| Parameter | Type | Description |
+| :------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `resourcePath` | `string` | The path to the resource.<br />Must follow the same syntax as defined in `tauri.conf.json > bundle > resources`, i.e. keeping subfolders and parent dir components (`../`). |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+The full path to the resource.
-<a id="resourcedir" name="resourcedir"></a>
+**Source**: [path.ts:431](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L431)
+
+---
### resourceDir()
```ts
-function resourceDir(): Promise<string>;
+resourceDir(): Promise< string >
```
Returns the path to the application's resource directory.
To resolve a resource path, see the [[resolveResource | `resolveResource API`]].
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -1211,16 +1147,18 @@ const resourceDirPath = await resourceDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:411](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L411)
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
----
+**Source**: [path.ts:411](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L411)
-<a id="runtimedir" name="runtimedir"></a>
+---
### runtimeDir()
```ts
-function runtimeDir(): Promise<string>;
+runtimeDir(): Promise< string >
```
Returns the path to the user's runtime directory.
@@ -1231,10 +1169,6 @@ Returns the path to the user's runtime directory.
- **macOS:** Not supported.
- **Windows:** Not supported.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -1246,16 +1180,18 @@ const runtimeDirPath = await runtimeDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:454](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L454)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:454](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L454)
-<a id="sep" name="sep"></a>
+---
### sep()
```ts
-function sep(): string;
+sep(): string
```
Returns the platform-specific path segment separator:
@@ -1263,32 +1199,26 @@ Returns the platform-specific path segment separator:
- `\` on Windows
- `/` on POSIX
-#### Returns
-
-`string`
-
#### Since
2.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:549](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L549)
+#### Returns
----
+`string`
-<a id="tempdir" name="tempdir"></a>
+**Source**: [path.ts:549](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L549)
+
+---
### tempDir()
```ts
-function tempDir(): Promise<string>;
+tempDir(): Promise< string >
```
Returns a temporary directory.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -1300,16 +1230,18 @@ const temp = await tempDir();
2.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:536](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L536)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:536](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L536)
-<a id="templatedir" name="templatedir"></a>
+---
### templateDir()
```ts
-function templateDir(): Promise<string>;
+templateDir(): Promise< string >
```
Returns the path to the user's template directory.
@@ -1320,10 +1252,6 @@ Returns the path to the user's template directory.
- **macOS:** Not supported.
- **Windows:** Resolves to `{FOLDERID_Templates}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -1335,16 +1263,18 @@ const templateDirPath = await templateDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:476](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L476)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="videodir" name="videodir"></a>
+**Source**: [path.ts:476](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L476)
+
+---
### videoDir()
```ts
-function videoDir(): Promise<string>;
+videoDir(): Promise< string >
```
Returns the path to the user's video directory.
@@ -1355,10 +1285,6 @@ Returns the path to the user's video directory.
- **macOS:** Resolves to `$HOME/Movies`.
- **Windows:** Resolves to `{FOLDERID_Videos}`.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -1370,4 +1296,8 @@ const videoDirPath = await videoDir();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/path.ts:498](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L498)
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [path.ts:498](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/path.ts#L498)
diff --git a/src/content/docs/references/javascript/api/Namespace.tray.md b/src/content/docs/references/javascript/api/Namespace.tray.md
index ad6436a6..d0787098 100644
--- a/src/content/docs/references/javascript/api/Namespace.tray.md
+++ b/src/content/docs/references/javascript/api/Namespace.tray.md
@@ -7,19 +7,17 @@ sidebar:
## Classes
-<a id="trayicon" name="trayicon"></a>
-
### TrayIcon
Tray icon class and associated methods. This type constructor is private,
-instead, you should use the static method [`TrayIcon.new`](/references/javascript/api/namespaces/tray.md#new).
+instead, you should use the static method [`TrayIcon.new`](/references/javascript/api/namespacetray/#new).
#### Warning
Unlike Rust, javascript does not have any way to run cleanup code
when an object is being removed by garbage collection, but this tray icon
will be cleaned up when the tauri app exists, however if you want to cleanup
-this object early, you need to call [`TrayIcon.close`](/references/javascript/api/namespaces/core.md#close).
+this object early, you need to call [`TrayIcon.close`](/references/javascript/api/namespacecore/#close).
#### Example
@@ -31,13 +29,11 @@ tray.set_tooltip('new tooltip');
#### Extends
-- [`Resource`](/references/javascript/api/namespaces/core.md#resource)
+- [`Resource`](/references/javascript/api/namespacecore/#resource)
#### Constructors
-<a id="constructors" name="constructors"></a>
-
-##### new TrayIcon()
+##### constructor()
```ts
private new TrayIcon(rid, id): TrayIcon
@@ -52,45 +48,41 @@ private new TrayIcon(rid, id): TrayIcon
###### Returns
-[`TrayIcon`](/references/javascript/api/namespaces/tray.md#trayicon)
+[`TrayIcon`](/references/javascript/api/namespacetray/#trayicon)
###### Overrides
-[`Resource`](/references/javascript/api/namespaces/core.md#resource).[`constructor`](/references/javascript/api/namespaces/core.md#constructors-2)
+[`Resource`](/references/javascript/api/namespacecore/#resource).[`constructor`](/references/javascript/api/namespacecore/#constructor)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:117](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L117)
+**Source**: [tray.ts:117](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L117)
#### Properties
-| Property | Modifier | Type | Description | Inherited from |
-| :----------------------------------- | :-------- | :------- | :------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="#rid" name="#rid"></a> `#rid` | `private` | `number` | - | [`Resource`](/references/javascript/api/namespaces/core.md#resource).[`#rid`](/references/javascript/api/namespaces/core.md##rid) |
-| <a id="id" name="id"></a> `id` | `public` | `string` | The id associated with this tray icon. | - |
+| Property | Type | Description |
+| :-------------------------------------------------------- | :------- | :------------------------------------- |
+| `private` `readonly` <a id="#rid" name="#rid"></a> `#rid` | `number` | - |
+| <a id="id" name="id"></a> `id` | `string` | The id associated with this tray icon. |
#### Accessors
-<a id="rid" name="rid"></a>
-
##### rid
```ts
get rid(): number
```
-###### Returns
+**Source**: [core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
-`number`
+###### Inherited from
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:222](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L222)
+[`Resource`](/references/javascript/api/namespacecore/#resource).[`rid`](/references/javascript/api/namespacecore/#rid)
#### Methods
-<a id="close" name="close"></a>
-
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -98,20 +90,20 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-[`Resource`](/references/javascript/api/namespaces/core.md#resource).[`close`](/references/javascript/api/namespaces/core.md#close)
+[`Resource`](/references/javascript/api/namespacecore/#resource).[`close`](/references/javascript/api/namespacecore/#close)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
+**Source**: [core.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L234)
-<a id="seticon" name="seticon"></a>
+---
##### setIcon()
```ts
-setIcon(icon): Promise<void>
+setIcon(icon): Promise< void >
```
Sets a new tray icon. If `null` is provided, it will remove the icon.
@@ -126,22 +118,22 @@ tauri = { version = "...", features = ["...", "image-png"] }
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `icon` | \| `null` \| `string` \| `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaces/image.md#image) |
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `icon` | `null` \| `string` \| `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaceimage/#image) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:178](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L178)
+**Source**: [tray.ts:178](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L178)
-<a id="seticonastemplate" name="seticonastemplate"></a>
+---
##### setIconAsTemplate()
```ts
-setIconAsTemplate(asTemplate): Promise<void>
+setIconAsTemplate(asTemplate): Promise< void >
```
Sets the current icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**
@@ -154,16 +146,16 @@ Sets the current icon as a [template](https://developer.apple.com/documentation/
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:246](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L246)
+**Source**: [tray.ts:246](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L246)
-<a id="setmenu" name="setmenu"></a>
+---
##### setMenu()
```ts
-setMenu(menu): Promise<void>
+setMenu(menu): Promise< void >
```
Sets a new tray menu.
@@ -174,22 +166,22 @@ Sets a new tray menu.
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------- |
-| `menu` | `null` \| [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu) \| [`Menu`](/references/javascript/api/namespaces/menu.md#menu) |
+| Parameter | Type |
+| :-------- | :----------------------------------------------------------------------------------------------------------------------------------- |
+| `menu` | `null` \| [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`Menu`](/references/javascript/api/namespacemenu/#menu) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:195](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L195)
+**Source**: [tray.ts:195](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L195)
-<a id="setmenuonleftclick" name="setmenuonleftclick"></a>
+---
##### setMenuOnLeftClick()
```ts
-setMenuOnLeftClick(onLeft): Promise<void>
+setMenuOnLeftClick(onLeft): Promise< void >
```
Disable or enable showing the tray menu on left click. **macOS only**.
@@ -202,16 +194,16 @@ Disable or enable showing the tray menu on left click. **macOS only**.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:254](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L254)
+**Source**: [tray.ts:254](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L254)
-<a id="settempdirpath" name="settempdirpath"></a>
+---
##### setTempDirPath()
```ts
-setTempDirPath(path): Promise<void>
+setTempDirPath(path): Promise< void >
```
Sets the tray icon temp dir path. **Linux only**.
@@ -227,16 +219,16 @@ be `$XDG_RUNTIME_DIR/tray-icon` or `$TEMP/tray-icon`.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:241](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L241)
+**Source**: [tray.ts:241](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L241)
-<a id="settitle" name="settitle"></a>
+---
##### setTitle()
```ts
-setTitle(title): Promise<void>
+setTitle(title): Promise< void >
```
Sets the tooltip for this tray icon.
@@ -258,16 +250,16 @@ Sets the tooltip for this tray icon.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:226](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L226)
+**Source**: [tray.ts:226](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L226)
-<a id="settooltip" name="settooltip"></a>
+---
##### setTooltip()
```ts
-setTooltip(tooltip): Promise<void>
+setTooltip(tooltip): Promise< void >
```
Sets the tooltip for this tray icon.
@@ -284,16 +276,16 @@ Sets the tooltip for this tray icon.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:210](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L210)
+**Source**: [tray.ts:210](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L210)
-<a id="setvisible" name="setvisible"></a>
+---
##### setVisible()
```ts
-setVisible(visible): Promise<void>
+setVisible(visible): Promise< void >
```
Show or hide this tray icon.
@@ -306,16 +298,16 @@ Show or hide this tray icon.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:231](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L231)
+**Source**: [tray.ts:231](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L231)
-<a id="getbyid" name="getbyid"></a>
+---
##### getById()
```ts
-static getById(id): Promise<null | TrayIcon>
+static getById(id): Promise< null | TrayIcon >
```
Gets a tray icon using the provided id.
@@ -328,43 +320,43 @@ Gets a tray icon using the provided id.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| [`TrayIcon`](/references/javascript/api/namespaces/tray.md#trayicon)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`TrayIcon`](/references/javascript/api/namespacetray/#trayicon) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:123](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L123)
+**Source**: [tray.ts:123](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L123)
-<a id="new" name="new"></a>
+---
##### new()
```ts
-static new(options?): Promise<TrayIcon>
+static new(options?): Promise< TrayIcon >
```
-Creates a new [`TrayIcon`](/references/javascript/api/namespaces/tray.md#trayicon)
+Creates a new [`TrayIcon`](/references/javascript/api/namespacetray/#trayicon)
#### Platform-specific:
- **Linux:** Sometimes the icon won't be visible unless a menu is set.
- Setting an empty [`Menu`](/references/javascript/api/namespaces/menu.md#menu) is enough.
+ Setting an empty [`Menu`](/references/javascript/api/namespacemenu/#menu) is enough.
###### Parameters
-| Parameter | Type |
-| :--------- | :--------------------------------------------------------------------------------- |
-| `options`? | [`TrayIconOptions`](/references/javascript/api/namespaces/tray.md#trayiconoptions) |
+| Parameter | Type |
+| :--------- | :----------------------------------------------------------------------------- |
+| `options`? | [`TrayIconOptions`](/references/javascript/api/namespacetray/#trayiconoptions) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`TrayIcon`](/references/javascript/api/namespaces/tray.md#trayicon)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`TrayIcon`](/references/javascript/api/namespacetray/#trayicon) \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:147](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L147)
+**Source**: [tray.ts:147](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L147)
-<a id="removebyid" name="removebyid"></a>
+---
##### removeById()
```ts
-static removeById(id): Promise<void>
+static removeById(id): Promise< void >
```
Removes a tray icon using the provided id from tauri's internal state.
@@ -380,14 +372,12 @@ if it wasn't cloned somewhere else or referenced by JS.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/tray.ts:135](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L135)
+**Source**: [tray.ts:135](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/tray.ts#L135)
## Interfaces
-<a id="trayiconevent" name="trayiconevent"></a>
-
### TrayIconEvent
Describes a tray event emitted when a tray icon is clicked
@@ -407,28 +397,26 @@ Describes a tray event emitted when a tray icon is clicked
| <a id="left" name="left"></a> `iconRect.left` | `number` | The x-coordinate of the upper-left corner of the rectangle. |
| <a id="right" name="right"></a> `iconRect.right` | `number` | The x-coordinate of the lower-right corner of the rectangle. |
| <a id="top" name="top"></a> `iconRect.top` | `number` | The y-coordinate of the upper-left corner of the rectangle. |
-| <a id="id-1" name="id-1"></a> `id` | `string` | Id of the tray icon which triggered this event. |
+| <a id="id" name="id"></a> `id` | `string` | Id of the tray icon which triggered this event. |
| <a id="x" name="x"></a> `x` | `number` | Physical X Position of the click the triggered this event. |
| <a id="y" name="y"></a> `y` | `number` | Physical Y Position of the click the triggered this event. |
---
-<a id="trayiconoptions" name="trayiconoptions"></a>
-
### TrayIconOptions
TrayIcon.new|`TrayIcon` creation options
#### Properties
-| Property | Type | Description |
-| :--------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="action" name="action"></a> `action?` | (`event`: [`TrayIconEvent`](/references/javascript/api/namespaces/tray.md#trayiconevent)) => `void` | A handler for an event on the tray icon. |
-| <a id="icon" name="icon"></a> `icon?` | \| `string` \| `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaces/image.md#image) | The tray icon which could be icon bytes or path to the icon file.<br /><br />Note that you need the `image-ico` or `image-png` Cargo features to use this API.<br />To enable it, change your Cargo.toml file:<br />`toml[dependencies]tauri = { version = "...", features = ["...", "image-png"] }` |
-| <a id="iconastemplate" name="iconastemplate"></a> `iconAsTemplate?` | `boolean` | Use the icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**. |
-| <a id="id-2" name="id-2"></a> `id?` | `string` | The tray icon id. If undefined, a random one will be assigned |
-| <a id="menu" name="menu"></a> `menu?` | [`Submenu`](/references/javascript/api/namespaces/menu.md#submenu) \| [`Menu`](/references/javascript/api/namespaces/menu.md#menu) | The tray icon menu |
-| <a id="menuonleftclick" name="menuonleftclick"></a> `menuOnLeftClick?` | `boolean` | Whether to show the tray menu on left click or not, default is `true`. **macOS only**. |
-| <a id="tempdirpath" name="tempdirpath"></a> `tempDirPath?` | `string` | The tray icon temp dir path. **Linux only**.<br /><br />On Linux, we need to write the icon to the disk and usually it will<br />be `$XDG_RUNTIME_DIR/tray-icon` or `$TEMP/tray-icon`. |
-| <a id="title" name="title"></a> `title?` | `string` | The tray title<br /><br />#### Platform-specific<br /><br />- **Linux:** The title will not be shown unless there is an icon<br />as well. The title is useful for numerical and other frequently<br />updated information. In general, it shouldn't be shown unless a<br />user requests it as it can take up a significant amount of space<br />on the user's panel. This may not be shown in all visualizations.<br />- **Windows:** Unsupported. |
-| <a id="tooltip" name="tooltip"></a> `tooltip?` | `string` | The tray icon tooltip |
+| Property | Type | Description |
+| :--------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="action" name="action"></a> `action`? | (`event`) => `void` | - |
+| <a id="icon" name="icon"></a> `icon`? | `string` \| `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaceimage/#image) | The tray icon which could be icon bytes or path to the icon file.<br /><br />Note that you need the `image-ico` or `image-png` Cargo features to use this API.<br />To enable it, change your Cargo.toml file:<br />`toml [dependencies] tauri = { version = "...", features = ["...", "image-png"] } ` |
+| <a id="iconastemplate" name="iconastemplate"></a> `iconAsTemplate`? | `boolean` | Use the icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**. |
+| <a id="id" name="id"></a> `id`? | `string` | The tray icon id. If undefined, a random one will be assigned |
+| <a id="menu" name="menu"></a> `menu`? | [`Submenu`](/references/javascript/api/namespacemenu/#submenu) \| [`Menu`](/references/javascript/api/namespacemenu/#menu) | The tray icon menu |
+| <a id="menuonleftclick" name="menuonleftclick"></a> `menuOnLeftClick`? | `boolean` | Whether to show the tray menu on left click or not, default is `true`. **macOS only**. |
+| <a id="tempdirpath" name="tempdirpath"></a> `tempDirPath`? | `string` | The tray icon temp dir path. **Linux only**.<br /><br />On Linux, we need to write the icon to the disk and usually it will<br />be `$XDG_RUNTIME_DIR/tray-icon` or `$TEMP/tray-icon`. |
+| <a id="title" name="title"></a> `title`? | `string` | The tray title<br /><br />#### Platform-specific<br /><br />- **Linux:** The title will not be shown unless there is an icon<br />as well. The title is useful for numerical and other frequently<br />updated information. In general, it shouldn't be shown unless a<br />user requests it as it can take up a significant amount of space<br />on the user's panel. This may not be shown in all visualizations.<br />- **Windows:** Unsupported. |
+| <a id="tooltip" name="tooltip"></a> `tooltip`? | `string` | The tray icon tooltip |
diff --git a/src/content/docs/references/javascript/api/Namespace.webview.md b/src/content/docs/references/javascript/api/Namespace.webview.md
index 1e6cae14..64e4e6b3 100644
--- a/src/content/docs/references/javascript/api/Namespace.webview.md
+++ b/src/content/docs/references/javascript/api/Namespace.webview.md
@@ -9,7 +9,7 @@ Provides APIs to create webviews, communicate with other webviews and manipulate
## Webview events
-Events can be listened to using [Webview.listen](/references/javascript/api/namespaces/webview.md#listen):
+Events can be listened to using [Webview.listen](/references/javascript/api/namespacewebview/#listen):
```typescript
import { getCurrent } from '@tauri-apps/api/webview';
@@ -18,21 +18,29 @@ getCurrent().listen('my-webview-event', ({ event, payload }) => {});
## References
-<a id="dragdropevent" name="dragdropevent"></a>
-
### DragDropEvent
-Re-exports [DragDropEvent](/references/javascript/api/namespaces/window.md#dragdropevent)
+Re-exports [DragDropEvent](/references/javascript/api/namespacewindow/#dragdropevent)
-<a id="dragdroppayload" name="dragdroppayload"></a>
+```ts
+DragDropEvent;
+```
+
+**Source**: [webview.ts:684](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L684)
+
+---
### DragDropPayload
-Re-exports [DragDropPayload](/references/javascript/api/namespaces/window.md#dragdroppayload)
+Re-exports [DragDropPayload](/references/javascript/api/namespacewindow/#dragdroppayload)
-## Classes
+```ts
+DragDropPayload;
+```
-<a id="webview" name="webview"></a>
+**Source**: [webview.ts:684](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L684)
+
+## Classes
### Webview
@@ -76,39 +84,23 @@ unlisten();
2.0.0
-#### Extended by
+#### Extended By
-- [`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow)
+- [`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow)
#### Constructors
-<a id="constructors" name="constructors"></a>
-
-##### new Webview()
+##### constructor()
```ts
new Webview(
- window,
- label,
- options): Webview
+ window,
+ label,
+ options): Webview
```
Creates a new Webview.
-###### Parameters
-
-| Parameter | Type | Description |
-| :-------- | :---------------------------------------------------------------------------------- | :------------------------------------------------------------ |
-| `window` | [`Window`](/references/javascript/api/namespaces/window.md#window) | the window to add this webview to. |
-| `label` | `string` | The unique webview label. Must be alphanumeric: `a-zA-Z-/:_`. |
-| `options` | [`WebviewOptions`](/references/javascript/api/namespaces/webview.md#webviewoptions) | - |
-
-###### Returns
-
-[`Webview`](/references/javascript/api/namespaces/webview.md#webview)
-
-The [Webview](/references/javascript/api/namespaces/webview.md#webview) instance to communicate with the webview.
-
###### Example
```typescript
@@ -126,34 +118,40 @@ webview.once('tauri://error', function (e) {
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:159](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L159)
+###### Parameters
+
+| Parameter | Type | Description |
+| :-------- | :------------------------------------------------------------------------------ | :------------------------------------------------------------ |
+| `window` | [`Window`](/references/javascript/api/namespacewindow/#window) | the window to add this webview to. |
+| `label` | `string` | The unique webview label. Must be alphanumeric: `a-zA-Z-/:_`. |
+| `options` | [`WebviewOptions`](/references/javascript/api/namespacewebview/#webviewoptions) | - |
+
+###### Returns
+
+[`Webview`](/references/javascript/api/namespacewebview/#webview)
+
+The [Webview](/references/javascript/api/namespacewebview/#webview) instance to communicate with the webview.
+
+**Source**: [webview.ts:159](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L159)
#### Properties
-| Property | Type | Description |
-| :-------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------- |
-| <a id="label" name="label"></a> `label` | `string` | The webview label. It is a unique identifier for the webview, can be used to reference it later. |
-| <a id="listeners" name="listeners"></a> `listeners` | [`Record ↗️`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`any`\>[]\> | Local event listeners. |
-| <a id="window" name="window"></a> `window` | [`Window`](/references/javascript/api/namespaces/window.md#window) | The window hosting this webview. |
+| Property | Type | Description |
+| :-------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------- |
+| <a id="label" name="label"></a> `label` | `string` | The webview label. It is a unique identifier for the webview, can be used to reference it later. |
+| <a id="listeners" name="listeners"></a> `listeners` | [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\< `string`, [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `any` \>[] \> | Local event listeners. |
+| <a id="window" name="window"></a> `window` | [`Window`](/references/javascript/api/namespacewindow/#window) | The window hosting this webview. |
#### Methods
-<a id="close" name="close"></a>
-
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Closes the webview.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -161,28 +159,23 @@ import { getCurrent } from '@tauri-apps/api/webview';
await getCurrent().close();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:396](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L396)
-
-<a id="emit" name="emit"></a>
+###### Returns
-##### emit()
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-```ts
-emit(event, payload?): Promise<void>
-```
+A promise indicating the success or failure of the operation.
-Emits an event to all [targets](/references/javascript/api/namespaces/event.md#eventtarget).
+**Source**: [webview.ts:396](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L396)
-###### Parameters
+---
-| Parameter | Type | Description |
-| :--------- | :-------- | :---------------------------------------------------------------------------- |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `payload`? | `unknown` | Event payload. |
+##### emit()
-###### Returns
+```ts
+emit(event, payload?): Promise< void >
+```
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+Emits an event to all [targets](/references/javascript/api/namespaceevent/#eventtarget).
###### Example
@@ -194,32 +187,31 @@ await getCurrent().emit('webview-loaded', {
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:285](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L285)
+###### Parameters
-<a id="emitto" name="emitto"></a>
+| Parameter | Type | Description |
+| :--------- | :-------- | :---------------------------------------------------------------------------- |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `payload`? | `unknown` | Event payload. |
-##### emitTo()
+###### Returns
-```ts
-emitTo(
- target,
- event,
-payload?): Promise<void>
-```
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-Emits an event to all [targets](/references/javascript/api/namespaces/event.md#eventtarget) matching the given target.
+**Source**: [webview.ts:285](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L285)
-###### Parameters
+---
-| Parameter | Type | Description |
-| :--------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
-| `target` | `string` \| [`EventTarget`](/references/javascript/api/namespaces/event.md#eventtarget) | Label of the target Window/Webview/WebviewWindow or raw [EventTarget](/references/javascript/api/namespaces/event.md#eventtarget) object. |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `payload`? | `unknown` | Event payload. |
+##### emitTo()
-###### Returns
+```ts
+emitTo(
+ target,
+ event,
+ payload?): Promise< void >
+```
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+Emits an event to all [targets](/references/javascript/api/namespaceevent/#eventtarget) matching the given target.
###### Example
@@ -231,37 +223,29 @@ await getCurrent().emitTo('main', 'webview-loaded', {
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:313](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L313)
-
-<a id="listen" name="listen"></a>
-
-##### listen()
+###### Parameters
-```ts
-listen<T>(event, handler): Promise<UnlistenFn>
-```
+| Parameter | Type | Description |
+| :--------- | :---------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ |
+| `target` | `string` \| [`EventTarget`](/references/javascript/api/namespaceevent/#eventtarget) | Label of the target Window/Webview/WebviewWindow or raw [EventTarget](/references/javascript/api/namespaceevent/#eventtarget) object. |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `payload`? | `unknown` | Event payload. |
-Listen to an emitted event on this webview.
+###### Returns
-###### Type parameters
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-| Type parameter |
-| :------------- |
-| `T` |
+**Source**: [webview.ts:313](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L313)
-###### Parameters
-
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
-| `event` | [`EventName`](/references/javascript/api/namespaces/event.md#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`T`\> | Event handler. |
+---
-###### Returns
+##### listen()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+```ts
+listen<T>(event, handler): Promise< UnlistenFn >
+```
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+Listen to an emitted event on this webview.
###### Example
@@ -275,33 +259,40 @@ const unlisten = await getCurrent().listen<string>('state-changed', (event) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:225](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L225)
-
-<a id="ondragdropevent" name="ondragdropevent"></a>
-
-##### onDragDropEvent()
-
-```ts
-onDragDropEvent(handler): Promise<UnlistenFn>
-```
+###### Type parameters
-Listen to a file drop event.
-The listener is triggered when the user hovers the selected files on the webview,
-drops the files or cancels the operation.
+| Parameter |
+| :-------- |
+| `T` |
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`DragDropEvent`](/references/javascript/api/namespaces/window.md#dragdropevent)\> |
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
+| `event` | [`EventName`](/references/javascript/api/namespaceevent/#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `T` \> | Event handler. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
A promise resolving to a function to unlisten to the event.
Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+**Source**: [webview.ts:225](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L225)
+
+---
+
+##### onDragDropEvent()
+
+```ts
+onDragDropEvent(handler): Promise< UnlistenFn >
+```
+
+Listen to a file drop event.
+The listener is triggered when the user hovers the selected files on the webview,
+drops the files or cancels the operation.
+
###### Example
```typescript
@@ -320,37 +311,30 @@ const unlisten = await getCurrent().onDragDropEvent((event) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:544](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L544)
-
-<a id="once" name="once"></a>
-
-##### once()
+###### Parameters
-```ts
-once<T>(event, handler): Promise<UnlistenFn>
-```
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`DragDropEvent`](/references/javascript/api/namespacewindow/#dragdropevent) \> |
-Listen to an emitted event on this webview only once.
+###### Returns
-###### Type parameters
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
-| Type parameter |
-| :------------- |
-| `T` |
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-###### Parameters
+**Source**: [webview.ts:544](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L544)
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`T`\> | Event handler. |
+---
-###### Returns
+##### once()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+```ts
+once<T>(event, handler): Promise< UnlistenFn >
+```
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+Listen to an emitted event on this webview only once.
###### Example
@@ -364,24 +348,38 @@ const unlisten = await getCurrent().once<null>('initialized', (event) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:260](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L260)
+###### Type parameters
+
+| Parameter |
+| :-------- |
+| `T` |
-<a id="position" name="position"></a>
+###### Parameters
+
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `T` \> | Event handler. |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
+
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+
+**Source**: [webview.ts:260](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L260)
+
+---
##### position()
```ts
-position(): Promise<PhysicalPosition>
+position(): Promise< PhysicalPosition >
```
The position of the top-left hand corner of the webview's client area relative to the top-left hand corner of the desktop.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition)\>
-
-The webview's position.
-
###### Example
```typescript
@@ -389,55 +387,55 @@ import { getCurrent } from '@tauri-apps/api/webview';
const position = await getCurrent().position();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:358](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L358)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) \>
+
+The webview's position.
-<a id="reparent" name="reparent"></a>
+**Source**: [webview.ts:358](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L358)
+
+---
##### reparent()
```ts
-reparent(window): Promise<void>
+reparent(window): Promise< void >
```
Moves this webview to the given label.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/webview';
+await getCurrent().reparent('other-window');
+```
+
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `window` | `string` \| [`Window`](/references/javascript/api/namespaces/window.md#window) \| [`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow) |
+| Parameter | Type |
+| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `window` | `string` \| [`Window`](/references/javascript/api/namespacewindow/#window) \| [`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/webview';
-await getCurrent().reparent('other-window');
-```
+**Source**: [webview.ts:510](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L510)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:510](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L510)
-
-<a id="setfocus" name="setfocus"></a>
+---
##### setFocus()
```ts
-setFocus(): Promise<void>
+setFocus(): Promise< void >
```
Bring the webview to front and focus.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -445,80 +443,93 @@ import { getCurrent } from '@tauri-apps/api/webview';
await getCurrent().setFocus();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:477](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L477)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
-<a id="setposition" name="setposition"></a>
+**Source**: [webview.ts:477](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L477)
+
+---
##### setPosition()
```ts
-setPosition(position): Promise<void>
+setPosition(position): Promise< void >
```
Sets the webview position.
+###### Example
+
+```typescript
+import { getCurrent, LogicalPosition } from '@tauri-apps/api/webview';
+await getCurrent().setPosition(new LogicalPosition(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :--------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------- |
-| `position` | [`LogicalPosition`](/references/javascript/api/namespaces/dpi.md#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition) | The new position, in logical or physical pixels. |
+| Parameter | Type | Description |
+| :--------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------- |
+| `position` | [`LogicalPosition`](/references/javascript/api/namespacedpi/#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) | The new position, in logical or physical pixels. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent, LogicalPosition } from '@tauri-apps/api/webview';
-await getCurrent().setPosition(new LogicalPosition(600, 500));
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:443](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L443)
+**Source**: [webview.ts:443](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L443)
-<a id="setsize" name="setsize"></a>
+---
##### setSize()
```ts
-setSize(size): Promise<void>
+setSize(size): Promise< void >
```
Resizes the webview.
+###### Example
+
+```typescript
+import { getCurrent, LogicalSize } from '@tauri-apps/api/webview';
+await getCurrent().setSize(new LogicalSize(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- |
-| `size` | [`LogicalSize`](/references/javascript/api/namespaces/dpi.md#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize) | The logical or physical size. |
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- |
+| `size` | [`LogicalSize`](/references/javascript/api/namespacedpi/#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) | The logical or physical size. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
+**Source**: [webview.ts:413](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L413)
-```typescript
-import { getCurrent, LogicalSize } from '@tauri-apps/api/webview';
-await getCurrent().setSize(new LogicalSize(600, 500));
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:413](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L413)
-
-<a id="setzoom" name="setzoom"></a>
+---
##### setZoom()
```ts
-setZoom(scaleFactor): Promise<void>
+setZoom(scaleFactor): Promise< void >
```
Set webview zoom level.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/webview';
+await getCurrent().setZoom(1.5);
+```
+
###### Parameters
| Parameter | Type |
@@ -527,36 +538,23 @@ Set webview zoom level.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
+**Source**: [webview.ts:493](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L493)
-```typescript
-import { getCurrent } from '@tauri-apps/api/webview';
-await getCurrent().setZoom(1.5);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:493](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L493)
-
-<a id="size" name="size"></a>
+---
##### size()
```ts
-size(): Promise<PhysicalSize>
+size(): Promise< PhysicalSize >
```
The physical size of the webview's client area.
The client area is the content of the webview, excluding the title bar and borders.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize)\>
-
-The webview's size.
-
###### Example
```typescript
@@ -564,9 +562,15 @@ import { getCurrent } from '@tauri-apps/api/webview';
const size = await getCurrent().size();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:375](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L375)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) \>
+
+The webview's size.
-<a id="getall" name="getall"></a>
+**Source**: [webview.ts:375](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L375)
+
+---
##### getAll()
@@ -578,11 +582,11 @@ Gets a list of instances of `Webview` for all available webviews.
###### Returns
-[`Webview`](/references/javascript/api/namespaces/webview.md#webview)[]
+[`Webview`](/references/javascript/api/namespacewebview/#webview)[]
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:202](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L202)
+**Source**: [webview.ts:202](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L202)
-<a id="getbylabel" name="getbylabel"></a>
+---
##### getByLabel()
@@ -592,6 +596,13 @@ static getByLabel(label): null | Webview
Gets the Webview for the webview associated with the given label.
+###### Example
+
+```typescript
+import { Webview } from '@tauri-apps/api/webview';
+const mainWebview = Webview.getByLabel('main');
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -600,20 +611,13 @@ Gets the Webview for the webview associated with the given label.
###### Returns
-`null` \| [`Webview`](/references/javascript/api/namespaces/webview.md#webview)
+`null` \| [`Webview`](/references/javascript/api/namespacewebview/#webview)
The Webview instance to communicate with the webview or null if the webview doesn't exist.
-###### Example
-
-```typescript
-import { Webview } from '@tauri-apps/api/webview';
-const mainWebview = Webview.getByLabel('main');
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:188](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L188)
+**Source**: [webview.ts:188](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L188)
-<a id="getcurrent" name="getcurrent"></a>
+---
##### getCurrent()
@@ -625,14 +629,12 @@ Get an instance of `Webview` for the current webview.
###### Returns
-[`Webview`](/references/javascript/api/namespaces/webview.md#webview)
+[`Webview`](/references/javascript/api/namespacewebview/#webview)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:195](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L195)
+**Source**: [webview.ts:195](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L195)
## Interfaces
-<a id="webviewoptions" name="webviewoptions"></a>
-
### WebviewOptions
Configuration for the webview to create.
@@ -645,59 +647,55 @@ Configuration for the webview to create.
| Property | Type | Description |
| :------------------------------------------------------------------------------ | :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="acceptfirstmouse" name="acceptfirstmouse"></a> `acceptFirstMouse?` | `boolean` | Whether clicking an inactive webview also clicks through to the webview on macOS. |
-| <a id="dragdropenabled" name="dragdropenabled"></a> `dragDropEnabled?` | `boolean` | Whether the drag and drop is enabled or not on the webview. By default it is enabled.<br /><br />Disabling it is required to use HTML5 drag and drop on the frontend on Windows. |
+| <a id="acceptfirstmouse" name="acceptfirstmouse"></a> `acceptFirstMouse`? | `boolean` | Whether clicking an inactive webview also clicks through to the webview on macOS. |
+| <a id="dragdropenabled" name="dragdropenabled"></a> `dragDropEnabled`? | `boolean` | Whether the drag and drop is enabled or not on the webview. By default it is enabled.<br /><br />Disabling it is required to use HTML5 drag and drop on the frontend on Windows. |
| <a id="height" name="height"></a> `height` | `number` | The initial height. |
-| <a id="incognito" name="incognito"></a> `incognito?` | `boolean` | Whether or not the webview should be launched in incognito mode.<br /><br />#### Platform-specific<br /><br />- **Android:** Unsupported. |
-| <a id="proxyurl" name="proxyurl"></a> `proxyUrl?` | `string` | The proxy URL for the WebView for all network requests.<br /><br />Must be either a `http://` or a `socks5://` URL.<br /><br />#### Platform-specific<br /><br />- **macOS**: Requires the `macos-proxy` feature flag and only compiles for macOS 14+. |
-| <a id="transparent" name="transparent"></a> `transparent?` | `boolean` | Whether the webview is transparent or not.<br />Note that on `macOS` this requires the `macos-private-api` feature flag, enabled under `tauri.conf.json > app > macOSPrivateApi`.<br />WARNING: Using private APIs on `macOS` prevents your application from being accepted to the `App Store`. |
-| <a id="url" name="url"></a> `url?` | `string` | Remote URL or local file path to open.<br /><br />- URL such as `https://github.com/tauri-apps` is opened directly on a Tauri webview.<br />- data: URL such as `data:text/html,<html>...` is only supported with the `webview-data-url` Cargo feature for the `tauri` dependency.<br />- local file path or route such as `/path/to/page.html` or `/users` is appended to the application URL (the devServer URL on development, or `tauri://localhost/` and `https://tauri.localhost/` on production). |
-| <a id="useragent" name="useragent"></a> `userAgent?` | `string` | The user agent for the webview. |
+| <a id="incognito" name="incognito"></a> `incognito`? | `boolean` | Whether or not the webview should be launched in incognito mode.<br /><br />#### Platform-specific<br /><br />- **Android:** Unsupported. |
+| <a id="proxyurl" name="proxyurl"></a> `proxyUrl`? | `string` | The proxy URL for the WebView for all network requests.<br /><br />Must be either a `http://` or a `socks5://` URL.<br /><br />#### Platform-specific<br /><br />- **macOS**: Requires the `macos-proxy` feature flag and only compiles for macOS 14+. |
+| <a id="transparent" name="transparent"></a> `transparent`? | `boolean` | Whether the webview is transparent or not.<br />Note that on `macOS` this requires the `macos-private-api` feature flag, enabled under `tauri.conf.json > app > macOSPrivateApi`.<br />WARNING: Using private APIs on `macOS` prevents your application from being accepted to the `App Store`. |
+| <a id="url" name="url"></a> `url`? | `string` | Remote URL or local file path to open.<br /><br />- URL such as `https://github.com/tauri-apps` is opened directly on a Tauri webview.<br />- data: URL such as `data:text/html,<html>...` is only supported with the `webview-data-url` Cargo feature for the `tauri` dependency.<br />- local file path or route such as `/path/to/page.html` or `/users` is appended to the application URL (the devServer URL on development, or `tauri://localhost/` and `https://tauri.localhost/` on production). |
+| <a id="useragent" name="useragent"></a> `userAgent`? | `string` | The user agent for the webview. |
| <a id="width" name="width"></a> `width` | `number` | The initial width. |
| <a id="x" name="x"></a> `x` | `number` | The initial vertical position. |
| <a id="y" name="y"></a> `y` | `number` | The initial horizontal position. |
-| <a id="zoomhotkeysenabled" name="zoomhotkeysenabled"></a> `zoomHotkeysEnabled?` | `boolean` | Whether page zooming by hotkeys is enabled<br /><br />## Platform-specific:<br /><br />- **Windows**: Controls WebView2's [`IsZoomControlEnabled`](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2settings?view=webview2-winrt-1.0.2420.47#iszoomcontrolenabled) setting.<br />- **MacOS / Linux**: Injects a polyfill that zooms in and out with `ctrl/command` + `-/=`,<br />20% in each step, ranging from 20% to 1000%. Requires `webview:allow-set-webview-zoom` permission<br /><br />- **Android / iOS**: Unsupported. |
+| <a id="zoomhotkeysenabled" name="zoomhotkeysenabled"></a> `zoomHotkeysEnabled`? | `boolean` | Whether page zooming by hotkeys is enabled<br /><br />## Platform-specific:<br /><br />- **Windows**: Controls WebView2's [`IsZoomControlEnabled`](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2settings?view=webview2-winrt-1.0.2420.47#iszoomcontrolenabled) setting.<br />- **MacOS / Linux**: Injects a polyfill that zooms in and out with `ctrl/command` + `-/=`,<br />20% in each step, ranging from 20% to 1000%. Requires `webview:allow-set-webview-zoom` permission<br /><br />- **Android / iOS**: Unsupported. |
## Functions
-<a id="getall-1" name="getall-1"></a>
-
### getAll()
```ts
-function getAll(): Webview[];
+getAll(): Webview[]
```
Gets a list of instances of `Webview` for all available webviews.
-#### Returns
-
-[`Webview`](/references/javascript/api/namespaces/webview.md#webview)[]
-
#### Since
2.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:73](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L73)
+#### Returns
----
+[`Webview`](/references/javascript/api/namespacewebview/#webview)[]
-<a id="getcurrent-1" name="getcurrent-1"></a>
+**Source**: [webview.ts:73](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L73)
+
+---
### getCurrent()
```ts
-function getCurrent(): Webview;
+getCurrent(): Webview
```
Get an instance of `Webview` for the current webview.
-#### Returns
-
-[`Webview`](/references/javascript/api/namespaces/webview.md#webview)
-
#### Since
2.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L57)
+#### Returns
+
+[`Webview`](/references/javascript/api/namespacewebview/#webview)
+
+**Source**: [webview.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L57)
diff --git a/src/content/docs/references/javascript/api/Namespace.webviewWindow.md b/src/content/docs/references/javascript/api/Namespace.webviewWindow.md
index 43734ce2..38c86109 100644
--- a/src/content/docs/references/javascript/api/Namespace.webviewWindow.md
+++ b/src/content/docs/references/javascript/api/Namespace.webviewWindow.md
@@ -7,21 +7,29 @@ sidebar:
## References
-<a id="dragdropevent" name="dragdropevent"></a>
-
### DragDropEvent
-Re-exports [DragDropEvent](/references/javascript/api/namespaces/window.md#dragdropevent)
+Re-exports [DragDropEvent](/references/javascript/api/namespacewindow/#dragdropevent)
+
+```ts
+DragDropEvent;
+```
+
+**Source**: [webviewWindow.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L234)
-<a id="dragdroppayload" name="dragdroppayload"></a>
+---
### DragDropPayload
-Re-exports [DragDropPayload](/references/javascript/api/namespaces/window.md#dragdroppayload)
+Re-exports [DragDropPayload](/references/javascript/api/namespacewindow/#dragdroppayload)
-## Classes
+```ts
+DragDropPayload;
+```
+
+**Source**: [webviewWindow.ts:234](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L234)
-<a id="webviewwindow" name="webviewwindow"></a>
+## Classes
### WebviewWindow
@@ -67,36 +75,17 @@ unlisten();
#### Extends
-- [`Webview`](/references/javascript/api/namespaces/webview.md#webview).[`Window`](/references/javascript/api/namespaces/window.md#window)
+- [`Webview`](/references/javascript/api/namespacewebview/#webview).[`Window`](/references/javascript/api/namespacewindow/#window)
#### Constructors
-<a id="constructors" name="constructors"></a>
-
-##### new WebviewWindow()
+##### constructor()
```ts
-new WebviewWindow(label, options): WebviewWindow
+new WebviewWindow(label, options = {}): WebviewWindow
```
-Creates a new [Window](/references/javascript/api/namespaces/window.md#window) hosting a [Webview](/references/javascript/api/namespaces/webview.md#webview).
-
-###### Parameters
-
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------ |
-| `label` | `string` | The unique webview label. Must be alphanumeric: `a-zA-Z-/:_`. |
-| `options` | [`Omit ↗️`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)\<[`WebviewOptions`](/references/javascript/api/namespaces/webview.md#webviewoptions), `"width"` \| `"height"` \| `"x"` \| `"y"`\> & [`WindowOptions`](/references/javascript/api/namespaces/window.md#windowoptions) | - |
-
-###### Returns
-
-[`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow)
-
-The [WebviewWindow](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow) instance to communicate with the window and webview.
-
-###### Inherited from
-
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`constructor`](/references/javascript/api/namespaces/window.md#constructors-1)
+Creates a new [Window](/references/javascript/api/namespacewindow/#window) hosting a [Webview](/references/javascript/api/namespacewebview/#webview).
###### Example
@@ -113,87 +102,92 @@ webview.once('tauri://error', function (e) {
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webviewWindow.ts:74](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L74)
+###### Parameters
+
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------ |
+| `label` | `string` | The unique webview label. Must be alphanumeric: `a-zA-Z-/:_`. |
+| `options` | [`Omit`](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys)\< [`WebviewOptions`](/references/javascript/api/namespacewebview/#webviewoptions), `"width"` \| `"height"` \| `"x"` \| `"y"` \> & [`WindowOptions`](/references/javascript/api/namespacewindow/#windowoptions) | - |
+
+###### Returns
+
+[`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow)
+
+The [WebviewWindow](/references/javascript/api/namespacewebviewwindow/#webviewwindow) instance to communicate with the window and webview.
+
+###### Inherited from
+
+[`Window`](/references/javascript/api/namespacewindow/#window).[`constructor`](/references/javascript/api/namespacewindow/#constructor)
+
+**Source**: [webviewWindow.ts:74](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L74)
#### Properties
-| Property | Type | Description | Inherited from |
-| :-------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ |
-| <a id="label" name="label"></a> `label` | `string` | The webview label. It is a unique identifier for the webview, can be used to reference it later. | [`Window`](/references/javascript/api/namespaces/window.md#window).[`label`](/references/javascript/api/namespaces/window.md#label) |
-| <a id="listeners" name="listeners"></a> `listeners` | [`Record ↗️`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`any`\>[]\> | Local event listeners. | [`Window`](/references/javascript/api/namespaces/window.md#window).[`listeners`](/references/javascript/api/namespaces/window.md#listeners) |
-| <a id="window" name="window"></a> `window` | [`Window`](/references/javascript/api/namespaces/window.md#window) | The window hosting this webview. | [`Webview`](/references/javascript/api/namespaces/webview.md#webview).[`window`](/references/javascript/api/namespaces/webview.md#window) |
+| Property | Type | Description |
+| :-------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------- |
+| <a id="label" name="label"></a> `label` | `string` | The webview label. It is a unique identifier for the webview, can be used to reference it later. |
+| <a id="listeners" name="listeners"></a> `listeners` | [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\< `string`, [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `any` \>[] \> | Local event listeners. |
+| <a id="window" name="window"></a> `window` | [`Window`](/references/javascript/api/namespacewindow/#window) | The window hosting this webview. |
#### Methods
-<a id="center" name="center"></a>
-
##### center()
```ts
-center(): Promise<void>
+center(): Promise< void >
```
Centers the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().center();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`center`](/references/javascript/api/namespaces/window.md#center)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`center`](/references/javascript/api/namespacewindow/#center)
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().center();
-```
+**Source**: [window.ts:801](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L801)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:801](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L801)
-
-<a id="cleareffects" name="cleareffects"></a>
+---
##### clearEffects()
```ts
-clearEffects(): Promise<void>
+clearEffects(): Promise< void >
```
Clear any applied effects if possible.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`clearEffects`](/references/javascript/api/namespaces/window.md#cleareffects)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`clearEffects`](/references/javascript/api/namespacewindow/#cleareffects)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1152](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1152)
+**Source**: [window.ts:1152](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1152)
-<a id="close" name="close"></a>
+---
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Closes the webview.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
-###### Inherited from
-
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`close`](/references/javascript/api/namespaces/window.md#close)
-
###### Example
```typescript
@@ -201,27 +195,27 @@ import { getCurrent } from '@tauri-apps/api/webview';
await getCurrent().close();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:396](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L396)
+###### Returns
-<a id="destroy" name="destroy"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-##### destroy()
+A promise indicating the success or failure of the operation.
-```ts
-destroy(): Promise<void>
-```
+###### Inherited from
-Destroys the window. Behaves like [Window.close](/references/javascript/api/namespaces/window.md#close) but forces the window close instead of emitting a closeRequested event.
+[`Window`](/references/javascript/api/namespacewindow/#window).[`close`](/references/javascript/api/namespacewindow/#close)
-###### Returns
+**Source**: [webview.ts:396](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L396)
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+---
-A promise indicating the success or failure of the operation.
+##### destroy()
-###### Inherited from
+```ts
+destroy(): Promise< void >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`destroy`](/references/javascript/api/namespaces/window.md#destroy)
+Destroys the window. Behaves like [Window.close](/references/javascript/api/namespacewindow/#close) but forces the window close instead of emitting a closeRequested event.
###### Example
@@ -230,32 +224,27 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().destroy();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1089](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1089)
-
-<a id="emit" name="emit"></a>
+###### Returns
-##### emit()
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-```ts
-emit(event, payload?): Promise<void>
-```
+A promise indicating the success or failure of the operation.
-Emits an event to all [targets](/references/javascript/api/namespaces/event.md#eventtarget).
+###### Inherited from
-###### Parameters
+[`Window`](/references/javascript/api/namespacewindow/#window).[`destroy`](/references/javascript/api/namespacewindow/#destroy)
-| Parameter | Type | Description |
-| :--------- | :-------- | :---------------------------------------------------------------------------- |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `payload`? | `unknown` | Event payload. |
+**Source**: [window.ts:1089](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1089)
-###### Returns
+---
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+##### emit()
-###### Inherited from
+```ts
+emit(event, payload?): Promise< void >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`emit`](/references/javascript/api/namespaces/window.md#emit)
+Emits an event to all [targets](/references/javascript/api/namespaceevent/#eventtarget).
###### Example
@@ -267,36 +256,35 @@ await getCurrent().emit('webview-loaded', {
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:285](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L285)
+###### Parameters
-<a id="emitto" name="emitto"></a>
+| Parameter | Type | Description |
+| :--------- | :-------- | :---------------------------------------------------------------------------- |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `payload`? | `unknown` | Event payload. |
-##### emitTo()
+###### Returns
-```ts
-emitTo(
- target,
- event,
-payload?): Promise<void>
-```
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-Emits an event to all [targets](/references/javascript/api/namespaces/event.md#eventtarget) matching the given target.
+###### Inherited from
-###### Parameters
+[`Window`](/references/javascript/api/namespacewindow/#window).[`emit`](/references/javascript/api/namespacewindow/#emit)
-| Parameter | Type | Description |
-| :--------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
-| `target` | `string` \| [`EventTarget`](/references/javascript/api/namespaces/event.md#eventtarget) | Label of the target Window/Webview/WebviewWindow or raw [EventTarget](/references/javascript/api/namespaces/event.md#eventtarget) object. |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `payload`? | `unknown` | Event payload. |
+**Source**: [webview.ts:285](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L285)
-###### Returns
+---
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+##### emitTo()
-###### Inherited from
+```ts
+emitTo(
+ target,
+ event,
+ payload?): Promise< void >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`emitTo`](/references/javascript/api/namespaces/window.md#emitto)
+Emits an event to all [targets](/references/javascript/api/namespaceevent/#eventtarget) matching the given target.
###### Example
@@ -308,27 +296,33 @@ await getCurrent().emitTo('main', 'webview-loaded', {
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:313](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L313)
+###### Parameters
-<a id="hide" name="hide"></a>
+| Parameter | Type | Description |
+| :--------- | :---------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ |
+| `target` | `string` \| [`EventTarget`](/references/javascript/api/namespaceevent/#eventtarget) | Label of the target Window/Webview/WebviewWindow or raw [EventTarget](/references/javascript/api/namespaceevent/#eventtarget) object. |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `payload`? | `unknown` | Event payload. |
-##### hide()
+###### Returns
-```ts
-hide(): Promise<void>
-```
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-Sets the window visibility to false.
+###### Inherited from
-###### Returns
+[`Window`](/references/javascript/api/namespacewindow/#window).[`emitTo`](/references/javascript/api/namespacewindow/#emitto)
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+**Source**: [webview.ts:313](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L313)
-A promise indicating the success or failure of the operation.
+---
-###### Inherited from
+##### hide()
+
+```ts
+hide(): Promise< void >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`hide`](/references/javascript/api/namespaces/window.md#hide)
+Sets the window visibility to false.
###### Example
@@ -337,27 +331,27 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().hide();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1055](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1055)
+###### Returns
-<a id="innerposition" name="innerposition"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-##### innerPosition()
+A promise indicating the success or failure of the operation.
-```ts
-innerPosition(): Promise<PhysicalPosition>
-```
+###### Inherited from
-The position of the top-left hand corner of the window's client area relative to the top-left hand corner of the desktop.
+[`Window`](/references/javascript/api/namespacewindow/#window).[`hide`](/references/javascript/api/namespacewindow/#hide)
-###### Returns
+**Source**: [window.ts:1055](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1055)
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition)\>
+---
-The window's inner position.
+##### innerPosition()
-###### Inherited from
+```ts
+innerPosition(): Promise< PhysicalPosition >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`innerPosition`](/references/javascript/api/namespaces/window.md#innerposition)
+The position of the top-left hand corner of the window's client area relative to the top-left hand corner of the desktop.
###### Example
@@ -366,44 +360,54 @@ import { getCurrent } from '@tauri-apps/api/window';
const position = await getCurrent().innerPosition();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:519](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L519)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) \>
+
+The window's inner position.
+
+###### Inherited from
+
+[`Window`](/references/javascript/api/namespacewindow/#window).[`innerPosition`](/references/javascript/api/namespacewindow/#innerposition)
+
+**Source**: [window.ts:519](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L519)
-<a id="innersize" name="innersize"></a>
+---
##### innerSize()
```ts
-innerSize(): Promise<PhysicalSize>
+innerSize(): Promise< PhysicalSize >
```
The physical size of the window's client area.
The client area is the content of the window, excluding the title bar and borders.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const size = await getCurrent().innerSize();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) \>
The window's inner size.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`innerSize`](/references/javascript/api/namespaces/window.md#innersize)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const size = await getCurrent().innerSize();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`innerSize`](/references/javascript/api/namespacewindow/#innersize)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:552](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L552)
+**Source**: [window.ts:552](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L552)
-<a id="isclosable" name="isclosable"></a>
+---
##### isClosable()
```ts
-isClosable(): Promise<boolean>
+isClosable(): Promise< boolean >
```
Gets the window’s native close button state.
@@ -412,118 +416,118 @@ Gets the window’s native close button state.
- **iOS / Android:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const closable = await getCurrent().isClosable();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
Whether the window's native close button is enabled or not.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isClosable`](/references/javascript/api/namespaces/window.md#isclosable)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const closable = await getCurrent().isClosable();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isClosable`](/references/javascript/api/namespacewindow/#isclosable)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:732](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L732)
+**Source**: [window.ts:732](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L732)
-<a id="isdecorated" name="isdecorated"></a>
+---
##### isDecorated()
```ts
-isDecorated(): Promise<boolean>
+isDecorated(): Promise< boolean >
```
Gets the window's current decorated state.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const decorated = await getCurrent().isDecorated();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
Whether the window is decorated or not.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isDecorated`](/references/javascript/api/namespaces/window.md#isdecorated)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isDecorated`](/references/javascript/api/namespacewindow/#isdecorated)
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const decorated = await getCurrent().isDecorated();
-```
+**Source**: [window.ts:653](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L653)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:653](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L653)
-
-<a id="isfocused" name="isfocused"></a>
+---
##### isFocused()
```ts
-isFocused(): Promise<boolean>
+isFocused(): Promise< boolean >
```
Gets the window's current focus state.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const focused = await getCurrent().isFocused();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
Whether the window is focused or not.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isFocused`](/references/javascript/api/namespaces/window.md#isfocused)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const focused = await getCurrent().isFocused();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isFocused`](/references/javascript/api/namespacewindow/#isfocused)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:637](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L637)
+**Source**: [window.ts:637](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L637)
-<a id="isfullscreen" name="isfullscreen"></a>
+---
##### isFullscreen()
```ts
-isFullscreen(): Promise<boolean>
+isFullscreen(): Promise< boolean >
```
Gets the window's current fullscreen state.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const fullscreen = await getCurrent().isFullscreen();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
Whether the window is in fullscreen mode or not.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isFullscreen`](/references/javascript/api/namespaces/window.md#isfullscreen)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const fullscreen = await getCurrent().isFullscreen();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isFullscreen`](/references/javascript/api/namespacewindow/#isfullscreen)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:591](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L591)
+**Source**: [window.ts:591](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L591)
-<a id="ismaximizable" name="ismaximizable"></a>
+---
##### isMaximizable()
```ts
-isMaximizable(): Promise<boolean>
+isMaximizable(): Promise< boolean >
```
Gets the window’s native maximize button state.
@@ -532,60 +536,60 @@ Gets the window’s native maximize button state.
- **Linux / iOS / Android:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const maximizable = await getCurrent().isMaximizable();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
Whether the window's native maximize button is enabled or not.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isMaximizable`](/references/javascript/api/namespaces/window.md#ismaximizable)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const maximizable = await getCurrent().isMaximizable();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isMaximizable`](/references/javascript/api/namespacewindow/#ismaximizable)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:690](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L690)
+**Source**: [window.ts:690](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L690)
-<a id="ismaximized" name="ismaximized"></a>
+---
##### isMaximized()
```ts
-isMaximized(): Promise<boolean>
+isMaximized(): Promise< boolean >
```
Gets the window's current maximized state.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const maximized = await getCurrent().isMaximized();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
Whether the window is maximized or not.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isMaximized`](/references/javascript/api/namespaces/window.md#ismaximized)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const maximized = await getCurrent().isMaximized();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isMaximized`](/references/javascript/api/namespacewindow/#ismaximized)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:621](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L621)
+**Source**: [window.ts:621](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L621)
-<a id="isminimizable" name="isminimizable"></a>
+---
##### isMinimizable()
```ts
-isMinimizable(): Promise<boolean>
+isMinimizable(): Promise< boolean >
```
Gets the window’s native minimize button state.
@@ -594,42 +598,34 @@ Gets the window’s native minimize button state.
- **Linux / iOS / Android:** Unsupported.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window's native minimize button is enabled or not.
-
-###### Inherited from
-
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isMinimizable`](/references/javascript/api/namespaces/window.md#isminimizable)
-
-###### Example
+###### Example
```typescript
import { getCurrent } from '@tauri-apps/api/window';
const minimizable = await getCurrent().isMinimizable();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:711](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L711)
+###### Returns
-<a id="isminimized" name="isminimized"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-##### isMinimized()
+Whether the window's native minimize button is enabled or not.
-```ts
-isMinimized(): Promise<boolean>
-```
+###### Inherited from
-Gets the window's current minimized state.
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isMinimizable`](/references/javascript/api/namespacewindow/#isminimizable)
-###### Returns
+**Source**: [window.ts:711](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L711)
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+---
-###### Inherited from
+##### isMinimized()
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isMinimized`](/references/javascript/api/namespaces/window.md#isminimized)
+```ts
+isMinimized(): Promise< boolean >
+```
+
+Gets the window's current minimized state.
###### Example
@@ -638,27 +634,25 @@ import { getCurrent } from '@tauri-apps/api/window';
const minimized = await getCurrent().isMinimized();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:605](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L605)
+###### Returns
-<a id="isresizable" name="isresizable"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-##### isResizable()
+###### Inherited from
-```ts
-isResizable(): Promise<boolean>
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isMinimized`](/references/javascript/api/namespacewindow/#isminimized)
-Gets the window's current resizable state.
+**Source**: [window.ts:605](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L605)
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+---
-Whether the window is resizable or not.
+##### isResizable()
-###### Inherited from
+```ts
+isResizable(): Promise< boolean >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isResizable`](/references/javascript/api/namespaces/window.md#isresizable)
+Gets the window's current resizable state.
###### Example
@@ -667,27 +661,27 @@ import { getCurrent } from '@tauri-apps/api/window';
const resizable = await getCurrent().isResizable();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:669](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L669)
+###### Returns
-<a id="isvisible" name="isvisible"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-##### isVisible()
+Whether the window is resizable or not.
-```ts
-isVisible(): Promise<boolean>
-```
+###### Inherited from
-Gets the window's current visible state.
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isResizable`](/references/javascript/api/namespacewindow/#isresizable)
-###### Returns
+**Source**: [window.ts:669](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L669)
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+---
-Whether the window is visible or not.
+##### isVisible()
-###### Inherited from
+```ts
+isVisible(): Promise< boolean >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`isVisible`](/references/javascript/api/namespaces/window.md#isvisible)
+Gets the window's current visible state.
###### Example
@@ -696,41 +690,27 @@ import { getCurrent } from '@tauri-apps/api/window';
const visible = await getCurrent().isVisible();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:748](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L748)
-
-<a id="listen" name="listen"></a>
-
-##### listen()
-
-```ts
-listen<T>(event, handler): Promise<UnlistenFn>
-```
-
-Listen to an emitted event on this webivew window.
+###### Returns
-###### Type parameters
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-| Type parameter |
-| :------------- |
-| `T` |
+Whether the window is visible or not.
-###### Parameters
+###### Inherited from
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
-| `event` | [`EventName`](/references/javascript/api/namespaces/event.md#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`T`\> | Event handler. |
+[`Window`](/references/javascript/api/namespacewindow/#window).[`isVisible`](/references/javascript/api/namespacewindow/#isvisible)
-###### Returns
+**Source**: [window.ts:748](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L748)
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+---
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+##### listen()
-###### Inherited from
+```ts
+listen<T>(event, handler): Promise< UnlistenFn >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`listen`](/references/javascript/api/namespaces/window.md#listen)
+Listen to an emitted event on this webivew window.
###### Example
@@ -747,27 +727,41 @@ const unlisten = await WebviewWindow.getCurrent().listen<string>(
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webviewWindow.ts:154](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L154)
-
-<a id="maximize" name="maximize"></a>
+###### Type parameters
-##### maximize()
+| Parameter |
+| :-------- |
+| `T` |
-```ts
-maximize(): Promise<void>
-```
+###### Parameters
-Maximizes the window.
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
+| `event` | [`EventName`](/references/javascript/api/namespaceevent/#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `T` \> | Event handler. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
-A promise indicating the success or failure of the operation.
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`maximize`](/references/javascript/api/namespaces/window.md#maximize)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`listen`](/references/javascript/api/namespacewindow/#listen)
+
+**Source**: [webviewWindow.ts:154](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L154)
+
+---
+
+##### maximize()
+
+```ts
+maximize(): Promise< void >
+```
+
+Maximizes the window.
###### Example
@@ -776,27 +770,27 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().maximize();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:959](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L959)
+###### Returns
-<a id="minimize" name="minimize"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-##### minimize()
+A promise indicating the success or failure of the operation.
-```ts
-minimize(): Promise<void>
-```
+###### Inherited from
-Minimizes the window.
+[`Window`](/references/javascript/api/namespacewindow/#window).[`maximize`](/references/javascript/api/namespacewindow/#maximize)
-###### Returns
+**Source**: [window.ts:959](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L959)
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+---
-A promise indicating the success or failure of the operation.
+##### minimize()
-###### Inherited from
+```ts
+minimize(): Promise< void >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`minimize`](/references/javascript/api/namespaces/window.md#minimize)
+Minimizes the window.
###### Example
@@ -805,34 +799,27 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().minimize();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1007](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1007)
-
-<a id="oncloserequested" name="oncloserequested"></a>
+###### Returns
-##### onCloseRequested()
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-```ts
-onCloseRequested(handler): Promise<UnlistenFn>
-```
-
-Listen to window close requested. Emitted when the user requests to closes the window.
+A promise indicating the success or failure of the operation.
-###### Parameters
+###### Inherited from
-| Parameter | Type |
-| :-------- | :---------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | (`event`) => `void` \| [`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> |
+[`Window`](/references/javascript/api/namespacewindow/#window).[`minimize`](/references/javascript/api/namespacewindow/#minimize)
-###### Returns
+**Source**: [window.ts:1007](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1007)
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+---
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+##### onCloseRequested()
-###### Inherited from
+```ts
+onCloseRequested(handler): Promise< UnlistenFn >
+```
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`onCloseRequested`](/references/javascript/api/namespaces/window.md#oncloserequested)
+Listen to window close requested. Emitted when the user requests to closes the window.
###### Example
@@ -851,36 +838,36 @@ const unlisten = await getCurrent().onCloseRequested(async (event) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1700](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1700)
-
-<a id="ondragdropevent" name="ondragdropevent"></a>
-
-##### onDragDropEvent()
-
-```ts
-onDragDropEvent(handler): Promise<UnlistenFn>
-```
-
-Listen to a file drop event.
-The listener is triggered when the user hovers the selected files on the webview,
-drops the files or cancels the operation.
-
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`DragDropEvent`](/references/javascript/api/namespaces/window.md#dragdropevent)\> |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | (`event`) => `void` \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \> |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
A promise resolving to a function to unlisten to the event.
Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`onDragDropEvent`](/references/javascript/api/namespaces/window.md#ondragdropevent)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`onCloseRequested`](/references/javascript/api/namespacewindow/#oncloserequested)
+
+**Source**: [window.ts:1700](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1700)
+
+---
+
+##### onDragDropEvent()
+
+```ts
+onDragDropEvent(handler): Promise< UnlistenFn >
+```
+
+Listen to a file drop event.
+The listener is triggered when the user hovers the selected files on the webview,
+drops the files or cancels the operation.
###### Example
@@ -900,34 +887,34 @@ const unlisten = await getCurrent().onDragDropEvent((event) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:544](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L544)
-
-<a id="onfocuschanged" name="onfocuschanged"></a>
-
-##### onFocusChanged()
-
-```ts
-onFocusChanged(handler): Promise<UnlistenFn>
-```
-
-Listen to window focus change.
-
###### Parameters
-| Parameter | Type |
-| :-------- | :-------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`boolean`\> |
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`DragDropEvent`](/references/javascript/api/namespacewindow/#dragdropevent) \> |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
A promise resolving to a function to unlisten to the event.
Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`onFocusChanged`](/references/javascript/api/namespaces/window.md#onfocuschanged)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`onDragDropEvent`](/references/javascript/api/namespacewindow/#ondragdropevent)
+
+**Source**: [webview.ts:544](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L544)
+
+---
+
+##### onFocusChanged()
+
+```ts
+onFocusChanged(handler): Promise< UnlistenFn >
+```
+
+Listen to window focus change.
###### Example
@@ -941,34 +928,34 @@ const unlisten = await getCurrent().onFocusChanged(({ payload: focused }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1815](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1815)
-
-<a id="onmoved" name="onmoved"></a>
-
-##### onMoved()
-
-```ts
-onMoved(handler): Promise<UnlistenFn>
-```
-
-Listen to window move.
-
###### Parameters
-| Parameter | Type |
-| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition)\> |
+| Parameter | Type |
+| :-------- | :----------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `boolean` \> |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
A promise resolving to a function to unlisten to the event.
Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`onMoved`](/references/javascript/api/namespaces/window.md#onmoved)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`onFocusChanged`](/references/javascript/api/namespacewindow/#onfocuschanged)
+
+**Source**: [window.ts:1815](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1815)
+
+---
+
+##### onMoved()
+
+```ts
+onMoved(handler): Promise< UnlistenFn >
+```
+
+Listen to window move.
###### Example
@@ -982,34 +969,34 @@ const unlisten = await getCurrent().onMoved(({ payload: position }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1670](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1670)
-
-<a id="onresized" name="onresized"></a>
-
-##### onResized()
-
-```ts
-onResized(handler): Promise<UnlistenFn>
-```
-
-Listen to window resize.
-
###### Parameters
-| Parameter | Type |
-| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize)\> |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) \> |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
A promise resolving to a function to unlisten to the event.
Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`onResized`](/references/javascript/api/namespaces/window.md#onresized)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`onMoved`](/references/javascript/api/namespacewindow/#onmoved)
+
+**Source**: [window.ts:1670](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1670)
+
+---
+
+##### onResized()
+
+```ts
+onResized(handler): Promise< UnlistenFn >
+```
+
+Listen to window resize.
###### Example
@@ -1023,14 +1010,31 @@ const unlisten = await getCurrent().onResized(({ payload: size }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1646](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1646)
+###### Parameters
+
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) \> |
-<a id="onscalechanged" name="onscalechanged"></a>
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
+
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+
+###### Inherited from
+
+[`Window`](/references/javascript/api/namespacewindow/#window).[`onResized`](/references/javascript/api/namespacewindow/#onresized)
+
+**Source**: [window.ts:1646](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1646)
+
+---
##### onScaleChanged()
```ts
-onScaleChanged(handler): Promise<UnlistenFn>
+onScaleChanged(handler): Promise< UnlistenFn >
```
Listen to window scale change. Emitted when the window's scale factor has changed.
@@ -1040,23 +1044,6 @@ The following user actions can cause DPI changes:
- Changing the display's scale factor (e.g. in Control Panel on Windows).
- Moving the window to a display with a different scale factor.
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`ScaleFactorChanged`](/references/javascript/api/namespaces/window.md#scalefactorchanged)\> |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
-
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-
-###### Inherited from
-
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`onScaleChanged`](/references/javascript/api/namespaces/window.md#onscalechanged)
-
###### Example
```typescript
@@ -1069,34 +1056,34 @@ const unlisten = await getCurrent().onScaleChanged(({ payload }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1855](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1855)
-
-<a id="onthemechanged" name="onthemechanged"></a>
-
-##### onThemeChanged()
-
-```ts
-onThemeChanged(handler): Promise<UnlistenFn>
-```
-
-Listen to the system theme change.
-
###### Parameters
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`Theme`](/references/javascript/api/namespaces/window.md#theme-2)\> |
+| Parameter | Type |
+| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`ScaleFactorChanged`](/references/javascript/api/namespacewindow/#scalefactorchanged) \> |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
A promise resolving to a function to unlisten to the event.
Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`onThemeChanged`](/references/javascript/api/namespaces/window.md#onthemechanged)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`onScaleChanged`](/references/javascript/api/namespacewindow/#onscalechanged)
+
+**Source**: [window.ts:1855](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1855)
+
+---
+
+##### onThemeChanged()
+
+```ts
+onThemeChanged(handler): Promise< UnlistenFn >
+```
+
+Listen to the system theme change.
###### Example
@@ -1110,41 +1097,34 @@ const unlisten = await getCurrent().onThemeChanged(({ payload: theme }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1881](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1881)
-
-<a id="once" name="once"></a>
-
-##### once()
-
-```ts
-once<T>(event, handler): Promise<UnlistenFn>
-```
-
-Listen to an emitted event on this webview window only once.
-
-###### Type parameters
-
-| Type parameter |
-| :------------- |
-| `T` |
-
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`T`\> | Event handler. |
+| Parameter | Type |
+| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`Theme`](/references/javascript/api/namespacewindow/#theme) \> |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
A promise resolving to a function to unlisten to the event.
Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`once`](/references/javascript/api/namespaces/window.md#once)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`onThemeChanged`](/references/javascript/api/namespacewindow/#onthemechanged)
+
+**Source**: [window.ts:1881](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1881)
+
+---
+
+##### once()
+
+```ts
+once<T>(event, handler): Promise< UnlistenFn >
+```
+
+Listen to an emitted event on this webview window only once.
###### Example
@@ -1161,27 +1141,41 @@ const unlisten = await WebviewWindow.getCurrent().once<null>(
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webviewWindow.ts:189](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L189)
-
-<a id="outerposition" name="outerposition"></a>
+###### Type parameters
-##### outerPosition()
+| Parameter |
+| :-------- |
+| `T` |
-```ts
-outerPosition(): Promise<PhysicalPosition>
-```
+###### Parameters
-The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop.
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `T` \> | Event handler. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
-The window's outer position.
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`outerPosition`](/references/javascript/api/namespaces/window.md#outerposition)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`once`](/references/javascript/api/namespacewindow/#once)
+
+**Source**: [webviewWindow.ts:189](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L189)
+
+---
+
+##### outerPosition()
+
+```ts
+outerPosition(): Promise< PhysicalPosition >
+```
+
+The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop.
###### Example
@@ -1190,108 +1184,118 @@ import { getCurrent } from '@tauri-apps/api/window';
const position = await getCurrent().outerPosition();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:535](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L535)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) \>
+
+The window's outer position.
+
+###### Inherited from
+
+[`Window`](/references/javascript/api/namespacewindow/#window).[`outerPosition`](/references/javascript/api/namespacewindow/#outerposition)
-<a id="outersize" name="outersize"></a>
+**Source**: [window.ts:535](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L535)
+
+---
##### outerSize()
```ts
-outerSize(): Promise<PhysicalSize>
+outerSize(): Promise< PhysicalSize >
```
The physical size of the entire window.
These dimensions include the title bar and borders. If you don't want that (and you usually don't), use inner_size instead.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const size = await getCurrent().outerSize();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) \>
The window's outer size.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`outerSize`](/references/javascript/api/namespaces/window.md#outersize)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`outerSize`](/references/javascript/api/namespacewindow/#outersize)
-###### Example
+**Source**: [window.ts:572](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L572)
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const size = await getCurrent().outerSize();
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:572](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L572)
-
-<a id="position" name="position"></a>
+---
##### position()
```ts
-position(): Promise<PhysicalPosition>
+position(): Promise< PhysicalPosition >
```
The position of the top-left hand corner of the webview's client area relative to the top-left hand corner of the desktop.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/webview';
+const position = await getCurrent().position();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) \>
The webview's position.
###### Inherited from
-[`Webview`](/references/javascript/api/namespaces/webview.md#webview).[`position`](/references/javascript/api/namespaces/webview.md#position)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/webview';
-const position = await getCurrent().position();
-```
+[`Webview`](/references/javascript/api/namespacewebview/#webview).[`position`](/references/javascript/api/namespacewebview/#position)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:358](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L358)
+**Source**: [webview.ts:358](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L358)
-<a id="reparent" name="reparent"></a>
+---
##### reparent()
```ts
-reparent(window): Promise<void>
+reparent(window): Promise< void >
```
Moves this webview to the given label.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/webview';
+await getCurrent().reparent('other-window');
+```
+
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| `window` | `string` \| [`Window`](/references/javascript/api/namespaces/window.md#window) \| [`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow) |
+| Parameter | Type |
+| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `window` | `string` \| [`Window`](/references/javascript/api/namespacewindow/#window) \| [`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Webview`](/references/javascript/api/namespaces/webview.md#webview).[`reparent`](/references/javascript/api/namespaces/webview.md#reparent)
+[`Webview`](/references/javascript/api/namespacewebview/#webview).[`reparent`](/references/javascript/api/namespacewebview/#reparent)
-###### Example
+**Source**: [webview.ts:510](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L510)
-```typescript
-import { getCurrent } from '@tauri-apps/api/webview';
-await getCurrent().reparent('other-window');
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:510](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L510)
-
-<a id="requestuserattention" name="requestuserattention"></a>
+---
##### requestUserAttention()
```ts
-requestUserAttention(requestType): Promise<void>
+requestUserAttention(requestType): Promise< void >
```
Requests user attention to the window, this has no effect if the application
@@ -1306,70 +1310,77 @@ user attention might not be done automatically by the WM when the window receive
- **macOS:** `null` has no effect.
- **Linux:** Urgency levels have the same effect.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().requestUserAttention();
+```
+
###### Parameters
-| Parameter | Type |
-| :------------ | :------------------------------------------------------------------------------------------------- |
-| `requestType` | `null` \| [`UserAttentionType`](/references/javascript/api/namespaces/window.md#userattentiontype) |
+| Parameter | Type |
+| :------------ | :--------------------------------------------------------------------------------------------- |
+| `requestType` | `null` \| [`UserAttentionType`](/references/javascript/api/namespacewindow/#userattentiontype) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`requestUserAttention`](/references/javascript/api/namespaces/window.md#requestuserattention)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().requestUserAttention();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`requestUserAttention`](/references/javascript/api/namespacewindow/#requestuserattention)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:827](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L827)
+**Source**: [window.ts:827](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L827)
-<a id="scalefactor" name="scalefactor"></a>
+---
##### scaleFactor()
```ts
-scaleFactor(): Promise<number>
+scaleFactor(): Promise< number >
```
The scale factor that can be used to map physical pixels to logical pixels.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const factor = await getCurrent().scaleFactor();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`number`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `number` \>
The window's monitor scale factor.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`scaleFactor`](/references/javascript/api/namespaces/window.md#scalefactor)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`scaleFactor`](/references/javascript/api/namespacewindow/#scalefactor)
-###### Example
+**Source**: [window.ts:503](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L503)
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const factor = await getCurrent().scaleFactor();
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:503](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L503)
-
-<a id="setalwaysonbottom" name="setalwaysonbottom"></a>
+---
##### setAlwaysOnBottom()
```ts
-setAlwaysOnBottom(alwaysOnBottom): Promise<void>
+setAlwaysOnBottom(alwaysOnBottom): Promise< void >
```
Whether the window should always be below other windows.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setAlwaysOnBottom(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1378,33 +1389,33 @@ Whether the window should always be below other windows.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setAlwaysOnBottom`](/references/javascript/api/namespaces/window.md#setalwaysonbottom)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setAlwaysOnBottom(true);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setAlwaysOnBottom`](/references/javascript/api/namespacewindow/#setalwaysonbottom)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1188](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1188)
+**Source**: [window.ts:1188](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1188)
-<a id="setalwaysontop" name="setalwaysontop"></a>
+---
##### setAlwaysOnTop()
```ts
-setAlwaysOnTop(alwaysOnTop): Promise<void>
+setAlwaysOnTop(alwaysOnTop): Promise< void >
```
Whether the window should always be on top of other windows.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setAlwaysOnTop(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1413,29 +1424,22 @@ Whether the window should always be on top of other windows.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setAlwaysOnTop`](/references/javascript/api/namespaces/window.md#setalwaysontop)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setAlwaysOnTop(true);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setAlwaysOnTop`](/references/javascript/api/namespacewindow/#setalwaysontop)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1170](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1170)
+**Source**: [window.ts:1170](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1170)
-<a id="setclosable" name="setclosable"></a>
+---
##### setClosable()
```ts
-setClosable(closable): Promise<void>
+setClosable(closable): Promise< void >
```
Sets whether the window's native close button is enabled or not.
@@ -1445,6 +1449,13 @@ Sets whether the window's native close button is enabled or not.
- **Linux:** GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible
- **iOS / Android:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setClosable(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -1453,33 +1464,33 @@ Sets whether the window's native close button is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setClosable`](/references/javascript/api/namespaces/window.md#setclosable)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setClosable`](/references/javascript/api/namespacewindow/#setclosable)
-###### Example
+**Source**: [window.ts:924](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L924)
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setClosable(false);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:924](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L924)
-
-<a id="setcontentprotected" name="setcontentprotected"></a>
+---
##### setContentProtected()
```ts
-setContentProtected(protected_): Promise<void>
+setContentProtected(protected_): Promise< void >
+```
+
+Prevents the window contents from being captured by other apps.
+
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setContentProtected(true);
```
-Prevents the window contents from being captured by other apps.
-
###### Parameters
| Parameter | Type |
@@ -1488,29 +1499,22 @@ Prevents the window contents from being captured by other apps.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setContentProtected`](/references/javascript/api/namespaces/window.md#setcontentprotected)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setContentProtected(true);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setContentProtected`](/references/javascript/api/namespacewindow/#setcontentprotected)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1205](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1205)
+**Source**: [window.ts:1205](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1205)
-<a id="setcursorgrab" name="setcursorgrab"></a>
+---
##### setCursorGrab()
```ts
-setCursorGrab(grab): Promise<void>
+setCursorGrab(grab): Promise< void >
```
Grabs the cursor, preventing it from leaving the window.
@@ -1523,6 +1527,13 @@ hide it by yourself if you want so.
- **Linux:** Unsupported.
- **macOS:** This locks the cursor in a fixed location, which looks visually awkward.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setCursorGrab(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1531,99 +1542,92 @@ hide it by yourself if you want so.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setCursorGrab`](/references/javascript/api/namespaces/window.md#setcursorgrab)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setCursorGrab(true);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setCursorGrab`](/references/javascript/api/namespacewindow/#setcursorgrab)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1449](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1449)
+**Source**: [window.ts:1449](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1449)
-<a id="setcursoricon" name="setcursoricon"></a>
+---
##### setCursorIcon()
```ts
-setCursorIcon(icon): Promise<void>
+setCursorIcon(icon): Promise< void >
```
Modifies the cursor icon of the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setCursorIcon('help');
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :------------------------------------------------------------------------- | :------------------- |
-| `icon` | [`CursorIcon`](/references/javascript/api/namespaces/window.md#cursoricon) | The new cursor icon. |
+| Parameter | Type | Description |
+| :-------- | :--------------------------------------------------------------------- | :------------------- |
+| `icon` | [`CursorIcon`](/references/javascript/api/namespacewindow/#cursoricon) | The new cursor icon. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setCursorIcon`](/references/javascript/api/namespaces/window.md#setcursoricon)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setCursorIcon`](/references/javascript/api/namespacewindow/#setcursoricon)
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setCursorIcon('help');
-```
+**Source**: [window.ts:1491](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1491)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1491](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1491)
-
-<a id="setcursorposition" name="setcursorposition"></a>
+---
##### setCursorPosition()
```ts
-setCursorPosition(position): Promise<void>
+setCursorPosition(position): Promise< void >
```
Changes the position of the cursor in window coordinates.
+###### Example
+
+```typescript
+import { getCurrent, LogicalPosition } from '@tauri-apps/api/window';
+await getCurrent().setCursorPosition(new LogicalPosition(600, 300));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :--------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- |
-| `position` | [`LogicalPosition`](/references/javascript/api/namespaces/dpi.md#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition) | The new cursor position. |
+| Parameter | Type | Description |
+| :--------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- |
+| `position` | [`LogicalPosition`](/references/javascript/api/namespacedpi/#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) | The new cursor position. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setCursorPosition`](/references/javascript/api/namespaces/window.md#setcursorposition)
-
-###### Example
-
-```typescript
-import { getCurrent, LogicalPosition } from '@tauri-apps/api/window';
-await getCurrent().setCursorPosition(new LogicalPosition(600, 300));
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setCursorPosition`](/references/javascript/api/namespacewindow/#setcursorposition)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1509](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1509)
+**Source**: [window.ts:1509](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1509)
-<a id="setcursorvisible" name="setcursorvisible"></a>
+---
##### setCursorVisible()
```ts
-setCursorVisible(visible): Promise<void>
+setCursorVisible(visible): Promise< void >
```
Modifies the cursor's visibility.
@@ -1634,6 +1638,13 @@ Modifies the cursor's visibility.
- **macOS:** The cursor is hidden as long as the window has input focus, even if the cursor is
outside of the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setCursorVisible(false);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1642,33 +1653,33 @@ Modifies the cursor's visibility.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setCursorVisible`](/references/javascript/api/namespaces/window.md#setcursorvisible)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setCursorVisible(false);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setCursorVisible`](/references/javascript/api/namespacewindow/#setcursorvisible)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1473](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1473)
+**Source**: [window.ts:1473](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1473)
-<a id="setdecorations" name="setdecorations"></a>
+---
##### setDecorations()
```ts
-setDecorations(decorations): Promise<void>
+setDecorations(decorations): Promise< void >
```
Whether the window should have borders and bars.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setDecorations(false);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1677,88 +1688,88 @@ Whether the window should have borders and bars.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setDecorations`](/references/javascript/api/namespaces/window.md#setdecorations)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setDecorations(false);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setDecorations`](/references/javascript/api/namespacewindow/#setdecorations)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1106](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1106)
+**Source**: [window.ts:1106](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1106)
-<a id="seteffects" name="seteffects"></a>
+---
##### setEffects()
```ts
-setEffects(effects): Promise<void>
+setEffects(effects): Promise< void >
```
Set window effects.
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------- |
-| `effects` | [`Effects`](/references/javascript/api/namespaces/window.md#effects) |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------- |
+| `effects` | [`Effects`](/references/javascript/api/namespacewindow/#effects) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setEffects`](/references/javascript/api/namespaces/window.md#seteffects)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setEffects`](/references/javascript/api/namespacewindow/#seteffects)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1142](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1142)
+**Source**: [window.ts:1142](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1142)
-<a id="setfocus" name="setfocus"></a>
+---
##### setFocus()
```ts
-setFocus(): Promise<void>
+setFocus(): Promise< void >
```
Bring the webview to front and focus.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/webview';
+await getCurrent().setFocus();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setFocus`](/references/javascript/api/namespaces/window.md#setfocus)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/webview';
-await getCurrent().setFocus();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setFocus`](/references/javascript/api/namespacewindow/#setfocus)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:477](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L477)
+**Source**: [webview.ts:477](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L477)
-<a id="setfullscreen" name="setfullscreen"></a>
+---
##### setFullscreen()
```ts
-setFullscreen(fullscreen): Promise<void>
+setFullscreen(fullscreen): Promise< void >
```
Sets the window fullscreen state.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setFullscreen(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1767,49 +1778,26 @@ Sets the window fullscreen state.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setFullscreen`](/references/javascript/api/namespaces/window.md#setfullscreen)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setFullscreen(true);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setFullscreen`](/references/javascript/api/namespacewindow/#setfullscreen)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1358](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1358)
+**Source**: [window.ts:1358](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1358)
-<a id="seticon" name="seticon"></a>
+---
##### setIcon()
```ts
-setIcon(icon): Promise<void>
+setIcon(icon): Promise< void >
```
Sets the window icon.
-###### Parameters
-
-| Parameter | Type | Description |
-| :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- |
-| `icon` | \| `string` \| `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaces/image.md#image) | Icon bytes or path to the icon file. |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
-###### Inherited from
-
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setIcon`](/references/javascript/api/namespaces/window.md#seticon)
-
###### Example
```typescript
@@ -1825,18 +1813,41 @@ To enable it, change your Cargo.toml file:
tauri = { version = "...", features = ["...", "image-png"] }
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1399](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1399)
+###### Parameters
+
+| Parameter | Type | Description |
+| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- |
+| `icon` | `string` \| `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaceimage/#image) | Icon bytes or path to the icon file. |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+###### Inherited from
+
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setIcon`](/references/javascript/api/namespacewindow/#seticon)
+
+**Source**: [window.ts:1399](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1399)
-<a id="setignorecursorevents" name="setignorecursorevents"></a>
+---
##### setIgnoreCursorEvents()
```ts
-setIgnoreCursorEvents(ignore): Promise<void>
+setIgnoreCursorEvents(ignore): Promise< void >
```
Changes the cursor events behavior.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setIgnoreCursorEvents(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1845,64 +1856,57 @@ Changes the cursor events behavior.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setIgnoreCursorEvents`](/references/javascript/api/namespaces/window.md#setignorecursorevents)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setIgnoreCursorEvents(true);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setIgnoreCursorEvents`](/references/javascript/api/namespacewindow/#setignorecursorevents)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1545](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1545)
+**Source**: [window.ts:1545](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1545)
-<a id="setmaxsize" name="setmaxsize"></a>
+---
##### setMaxSize()
```ts
-setMaxSize(size): Promise<void>
+setMaxSize(size): Promise< void >
```
Sets the window maximum inner size. If the `size` argument is undefined, the constraint is unset.
+###### Example
+
+```typescript
+import { getCurrent, LogicalSize } from '@tauri-apps/api/window';
+await getCurrent().setMaxSize(new LogicalSize(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- |
-| `size` | `undefined` \| `null` \| [`LogicalSize`](/references/javascript/api/namespaces/dpi.md#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize) | The logical or physical inner size, or `null` to unset the constraint. |
+| Parameter | Type | Description |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------- |
+| `size` | `undefined` \| `null` \| [`LogicalSize`](/references/javascript/api/namespacedpi/#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) | The logical or physical inner size, or `null` to unset the constraint. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setMaxSize`](/references/javascript/api/namespaces/window.md#setmaxsize)
-
-###### Example
-
-```typescript
-import { getCurrent, LogicalSize } from '@tauri-apps/api/window';
-await getCurrent().setMaxSize(new LogicalSize(600, 500));
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setMaxSize`](/references/javascript/api/namespacewindow/#setmaxsize)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1288](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1288)
+**Source**: [window.ts:1288](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1288)
-<a id="setmaximizable" name="setmaximizable"></a>
+---
##### setMaximizable()
```ts
-setMaximizable(maximizable): Promise<void>
+setMaximizable(maximizable): Promise< void >
```
Sets whether the window's native maximize button is enabled or not.
@@ -1913,6 +1917,13 @@ If resizable is set to false, this setting is ignored.
- **macOS:** Disables the "zoom" button in the window titlebar, which is also used to enter fullscreen mode.
- **Linux / iOS / Android:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setMaximizable(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -1921,64 +1932,57 @@ If resizable is set to false, this setting is ignored.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setMaximizable`](/references/javascript/api/namespaces/window.md#setmaximizable)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setMaximizable`](/references/javascript/api/namespacewindow/#setmaximizable)
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setMaximizable(false);
-```
+**Source**: [window.ts:879](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L879)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:879](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L879)
-
-<a id="setminsize" name="setminsize"></a>
+---
##### setMinSize()
```ts
-setMinSize(size): Promise<void>
+setMinSize(size): Promise< void >
```
Sets the window minimum inner size. If the `size` argument is not provided, the constraint is unset.
+###### Example
+
+```typescript
+import { getCurrent, PhysicalSize } from '@tauri-apps/api/window';
+await getCurrent().setMinSize(new PhysicalSize(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- |
-| `size` | `undefined` \| `null` \| [`LogicalSize`](/references/javascript/api/namespaces/dpi.md#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize) | The logical or physical inner size, or `null` to unset the constraint. |
+| Parameter | Type | Description |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------- |
+| `size` | `undefined` \| `null` \| [`LogicalSize`](/references/javascript/api/namespacedpi/#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) | The logical or physical inner size, or `null` to unset the constraint. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setMinSize`](/references/javascript/api/namespaces/window.md#setminsize)
-
-###### Example
-
-```typescript
-import { getCurrent, PhysicalSize } from '@tauri-apps/api/window';
-await getCurrent().setMinSize(new PhysicalSize(600, 500));
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setMinSize`](/references/javascript/api/namespacewindow/#setminsize)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1253](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1253)
+**Source**: [window.ts:1253](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1253)
-<a id="setminimizable" name="setminimizable"></a>
+---
##### setMinimizable()
```ts
-setMinimizable(minimizable): Promise<void>
+setMinimizable(minimizable): Promise< void >
```
Sets whether the window's native minimize button is enabled or not.
@@ -1987,6 +1991,13 @@ Sets whether the window's native minimize button is enabled or not.
- **Linux / iOS / Android:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setMinimizable(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -1995,64 +2006,57 @@ Sets whether the window's native minimize button is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setMinimizable`](/references/javascript/api/namespaces/window.md#setminimizable)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setMinimizable(false);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setMinimizable`](/references/javascript/api/namespacewindow/#setminimizable)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:901](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L901)
+**Source**: [window.ts:901](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L901)
-<a id="setposition" name="setposition"></a>
+---
##### setPosition()
```ts
-setPosition(position): Promise<void>
+setPosition(position): Promise< void >
```
Sets the webview position.
+###### Example
+
+```typescript
+import { getCurrent, LogicalPosition } from '@tauri-apps/api/webview';
+await getCurrent().setPosition(new LogicalPosition(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :--------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------- |
-| `position` | [`LogicalPosition`](/references/javascript/api/namespaces/dpi.md#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition) | The new position, in logical or physical pixels. |
+| Parameter | Type | Description |
+| :--------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------- |
+| `position` | [`LogicalPosition`](/references/javascript/api/namespacedpi/#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) | The new position, in logical or physical pixels. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setPosition`](/references/javascript/api/namespaces/window.md#setposition)
-
-###### Example
-
-```typescript
-import { getCurrent, LogicalPosition } from '@tauri-apps/api/webview';
-await getCurrent().setPosition(new LogicalPosition(600, 500));
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setPosition`](/references/javascript/api/namespacewindow/#setposition)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:443](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L443)
+**Source**: [webview.ts:443](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L443)
-<a id="setprogressbar" name="setprogressbar"></a>
+---
##### setProgressBar()
```ts
-setProgressBar(state): Promise<void>
+setProgressBar(state): Promise< void >
```
Sets the taskbar progress state.
@@ -2062,44 +2066,51 @@ Sets the taskbar progress state.
- **Linux / macOS**: Progress bar is app-wide and not specific to this window.
- **Linux**: Only supported desktop environments with `libunity` (e.g. GNOME).
+###### Example
+
+```typescript
+import { getCurrent, ProgressBarStatus } from '@tauri-apps/api/window';
+await getCurrent().setProgressBar({
+ status: ProgressBarStatus.Normal,
+ progress: 50,
+});
+```
+
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------- |
-| `state` | [`ProgressBarState`](/references/javascript/api/namespaces/window.md#progressbarstate) |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------------- |
+| `state` | [`ProgressBarState`](/references/javascript/api/namespacewindow/#progressbarstate) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setProgressBar`](/references/javascript/api/namespaces/window.md#setprogressbar)
-
-###### Example
-
-```typescript
-import { getCurrent, ProgressBarStatus } from '@tauri-apps/api/window';
-await getCurrent().setProgressBar({
- status: ProgressBarStatus.Normal,
- progress: 50,
-});
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setProgressBar`](/references/javascript/api/namespacewindow/#setprogressbar)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1604](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1604)
+**Source**: [window.ts:1604](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1604)
-<a id="setresizable" name="setresizable"></a>
+---
##### setResizable()
```ts
-setResizable(resizable): Promise<void>
+setResizable(resizable): Promise< void >
```
Updates the window resizable flag.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setResizable(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -2108,29 +2119,22 @@ Updates the window resizable flag.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setResizable`](/references/javascript/api/namespaces/window.md#setresizable)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setResizable(false);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setResizable`](/references/javascript/api/namespacewindow/#setresizable)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:855](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L855)
+**Source**: [window.ts:855](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L855)
-<a id="setshadow" name="setshadow"></a>
+---
##### setShadow()
```ts
-setShadow(enable): Promise<void>
+setShadow(enable): Promise< void >
```
Whether or not the window should have shadow.
@@ -2143,6 +2147,13 @@ Whether or not the window should have shadow.
and on Windows 11, it will have a rounded corners.
- **Linux:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setShadow(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -2151,64 +2162,57 @@ Whether or not the window should have shadow.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setShadow`](/references/javascript/api/namespaces/window.md#setshadow)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setShadow`](/references/javascript/api/namespacewindow/#setshadow)
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setShadow(false);
-```
+**Source**: [window.ts:1132](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1132)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1132](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1132)
-
-<a id="setsize" name="setsize"></a>
+---
##### setSize()
```ts
-setSize(size): Promise<void>
+setSize(size): Promise< void >
```
Resizes the webview.
+###### Example
+
+```typescript
+import { getCurrent, LogicalSize } from '@tauri-apps/api/webview';
+await getCurrent().setSize(new LogicalSize(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- |
-| `size` | [`LogicalSize`](/references/javascript/api/namespaces/dpi.md#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize) | The logical or physical size. |
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------- |
+| `size` | [`LogicalSize`](/references/javascript/api/namespacedpi/#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) | The logical or physical size. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setSize`](/references/javascript/api/namespaces/window.md#setsize)
-
-###### Example
-
-```typescript
-import { getCurrent, LogicalSize } from '@tauri-apps/api/webview';
-await getCurrent().setSize(new LogicalSize(600, 500));
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setSize`](/references/javascript/api/namespacewindow/#setsize)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:413](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L413)
+**Source**: [webview.ts:413](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L413)
-<a id="setskiptaskbar" name="setskiptaskbar"></a>
+---
##### setSkipTaskbar()
```ts
-setSkipTaskbar(skip): Promise<void>
+setSkipTaskbar(skip): Promise< void >
```
Whether the window icon should be hidden from the taskbar or not.
@@ -2217,6 +2221,13 @@ Whether the window icon should be hidden from the taskbar or not.
- **macOS:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setSkipTaskbar(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -2225,33 +2236,33 @@ Whether the window icon should be hidden from the taskbar or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setSkipTaskbar`](/references/javascript/api/namespaces/window.md#setskiptaskbar)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setSkipTaskbar(true);
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setSkipTaskbar`](/references/javascript/api/namespacewindow/#setskiptaskbar)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1423](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1423)
+**Source**: [window.ts:1423](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1423)
-<a id="settitle" name="settitle"></a>
+---
##### setTitle()
```ts
-setTitle(title): Promise<void>
+setTitle(title): Promise< void >
```
Sets the window title.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setTitle('Tauri');
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -2260,29 +2271,22 @@ Sets the window title.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setTitle`](/references/javascript/api/namespaces/window.md#settitle)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setTitle('Tauri');
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setTitle`](/references/javascript/api/namespacewindow/#settitle)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:942](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L942)
+**Source**: [window.ts:942](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L942)
-<a id="setvisibleonallworkspaces" name="setvisibleonallworkspaces"></a>
+---
##### setVisibleOnAllWorkspaces()
```ts
-setVisibleOnAllWorkspaces(visible): Promise<void>
+setVisibleOnAllWorkspaces(visible): Promise< void >
```
Sets whether the window should be visible on all workspaces or virtual desktops.
@@ -2291,6 +2295,10 @@ Sets whether the window should be visible on all workspaces or virtual desktops.
- **Windows / iOS / Android:** Unsupported.
+###### Since
+
+2.0.0
+
###### Parameters
| Parameter | Type |
@@ -2299,28 +2307,31 @@ Sets whether the window should be visible on all workspaces or virtual desktops.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`setVisibleOnAllWorkspaces`](/references/javascript/api/namespaces/window.md#setvisibleonallworkspaces)
-
-###### Since
-
-2.0.0
+[`Window`](/references/javascript/api/namespacewindow/#window).[`setVisibleOnAllWorkspaces`](/references/javascript/api/namespacewindow/#setvisibleonallworkspaces)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1620](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1620)
+**Source**: [window.ts:1620](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1620)
-<a id="setzoom" name="setzoom"></a>
+---
##### setZoom()
```ts
-setZoom(scaleFactor): Promise<void>
+setZoom(scaleFactor): Promise< void >
```
Set webview zoom level.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/webview';
+await getCurrent().setZoom(1.5);
+```
+
###### Parameters
| Parameter | Type |
@@ -2329,121 +2340,121 @@ Set webview zoom level.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Webview`](/references/javascript/api/namespaces/webview.md#webview).[`setZoom`](/references/javascript/api/namespaces/webview.md#setzoom)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/webview';
-await getCurrent().setZoom(1.5);
-```
+[`Webview`](/references/javascript/api/namespacewebview/#webview).[`setZoom`](/references/javascript/api/namespacewebview/#setzoom)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:493](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L493)
+**Source**: [webview.ts:493](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L493)
-<a id="show" name="show"></a>
+---
##### show()
```ts
-show(): Promise<void>
+show(): Promise< void >
```
Sets the window visibility to true.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().show();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`show`](/references/javascript/api/namespaces/window.md#show)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().show();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`show`](/references/javascript/api/namespacewindow/#show)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1039](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1039)
+**Source**: [window.ts:1039](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1039)
-<a id="size" name="size"></a>
+---
##### size()
```ts
-size(): Promise<PhysicalSize>
+size(): Promise< PhysicalSize >
```
The physical size of the webview's client area.
The client area is the content of the webview, excluding the title bar and borders.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/webview';
+const size = await getCurrent().size();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) \>
The webview's size.
###### Inherited from
-[`Webview`](/references/javascript/api/namespaces/webview.md#webview).[`size`](/references/javascript/api/namespaces/webview.md#size)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/webview';
-const size = await getCurrent().size();
-```
+[`Webview`](/references/javascript/api/namespacewebview/#webview).[`size`](/references/javascript/api/namespacewebview/#size)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:375](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L375)
+**Source**: [webview.ts:375](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L375)
-<a id="startdragging" name="startdragging"></a>
+---
##### startDragging()
```ts
-startDragging(): Promise<void>
+startDragging(): Promise< void >
```
Starts dragging the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().startDragging();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`startDragging`](/references/javascript/api/namespaces/window.md#startdragging)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().startDragging();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`startDragging`](/references/javascript/api/namespacewindow/#startdragging)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1562](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1562)
+**Source**: [window.ts:1562](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1562)
-<a id="startresizedragging" name="startresizedragging"></a>
+---
##### startResizeDragging()
```ts
-startResizeDragging(direction): Promise<void>
+startResizeDragging(direction): Promise< void >
```
Starts resize-dragging the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().startResizeDragging();
+```
+
###### Parameters
| Parameter | Type |
@@ -2452,29 +2463,22 @@ Starts resize-dragging the window.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`startResizeDragging`](/references/javascript/api/namespaces/window.md#startresizedragging)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().startResizeDragging();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`startResizeDragging`](/references/javascript/api/namespacewindow/#startresizedragging)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1578](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1578)
+**Source**: [window.ts:1578](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1578)
-<a id="theme" name="theme"></a>
+---
##### theme()
```ts
-theme(): Promise<null | Theme>
+theme(): Promise< null | Theme >
```
Gets the window's current theme.
@@ -2483,43 +2487,35 @@ Gets the window's current theme.
- **macOS:** Theme was introduced on macOS 10.14. Returns `light` on macOS 10.13 and below.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+const theme = await getCurrent().theme();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| [`Theme`](/references/javascript/api/namespaces/window.md#theme-2)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`Theme`](/references/javascript/api/namespacewindow/#theme) \>
The window theme.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`theme`](/references/javascript/api/namespaces/window.md#theme)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`theme`](/references/javascript/api/namespacewindow/#theme)
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-const theme = await getCurrent().theme();
-```
+**Source**: [window.ts:783](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L783)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:783](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L783)
-
-<a id="title" name="title"></a>
+---
##### title()
```ts
-title(): Promise<string>
+title(): Promise< string >
```
Gets the window's current title.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
-###### Inherited from
-
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`title`](/references/javascript/api/namespaces/window.md#title)
-
###### Example
```typescript
@@ -2527,96 +2523,104 @@ import { getCurrent } from '@tauri-apps/api/window';
const title = await getCurrent().title();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:762](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L762)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="togglemaximize" name="togglemaximize"></a>
+###### Inherited from
+
+[`Window`](/references/javascript/api/namespacewindow/#window).[`title`](/references/javascript/api/namespacewindow/#title)
+
+**Source**: [window.ts:762](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L762)
+
+---
##### toggleMaximize()
```ts
-toggleMaximize(): Promise<void>
+toggleMaximize(): Promise< void >
```
Toggles the window maximized state.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().toggleMaximize();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`toggleMaximize`](/references/javascript/api/namespaces/window.md#togglemaximize)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().toggleMaximize();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`toggleMaximize`](/references/javascript/api/namespacewindow/#togglemaximize)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:991](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L991)
+**Source**: [window.ts:991](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L991)
-<a id="unmaximize" name="unmaximize"></a>
+---
##### unmaximize()
```ts
-unmaximize(): Promise<void>
+unmaximize(): Promise< void >
```
Unmaximizes the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().unmaximize();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`unmaximize`](/references/javascript/api/namespaces/window.md#unmaximize)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().unmaximize();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`unmaximize`](/references/javascript/api/namespacewindow/#unmaximize)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:975](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L975)
+**Source**: [window.ts:975](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L975)
-<a id="unminimize" name="unminimize"></a>
+---
##### unminimize()
```ts
-unminimize(): Promise<void>
+unminimize(): Promise< void >
```
Unminimizes the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().unminimize();
+```
+
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`unminimize`](/references/javascript/api/namespaces/window.md#unminimize)
-
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().unminimize();
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`unminimize`](/references/javascript/api/namespacewindow/#unminimize)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1023](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1023)
+**Source**: [window.ts:1023](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1023)
-<a id="getall" name="getall"></a>
+---
##### getAll()
@@ -2628,15 +2632,15 @@ Gets a list of instances of `Webview` for all available webviews.
###### Returns
-[`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow)[]
+[`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow)[]
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`getAll`](/references/javascript/api/namespaces/window.md#getall)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`getAll`](/references/javascript/api/namespacewindow/#getall)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webviewWindow.ts:130](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L130)
+**Source**: [webviewWindow.ts:130](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L130)
-<a id="getbylabel" name="getbylabel"></a>
+---
##### getByLabel()
@@ -2646,6 +2650,13 @@ static getByLabel(label): null | WebviewWindow
Gets the Webview for the webview associated with the given label.
+###### Example
+
+```typescript
+import { Webview } from '@tauri-apps/api/webviewWindow';
+const mainWebview = Webview.getByLabel('main');
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -2654,24 +2665,17 @@ Gets the Webview for the webview associated with the given label.
###### Returns
-`null` \| [`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow)
+`null` \| [`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow)
The Webview instance to communicate with the webview or null if the webview doesn't exist.
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`getByLabel`](/references/javascript/api/namespaces/window.md#getbylabel)
-
-###### Example
-
-```typescript
-import { Webview } from '@tauri-apps/api/webviewWindow';
-const mainWebview = Webview.getByLabel('main');
-```
+[`Window`](/references/javascript/api/namespacewindow/#window).[`getByLabel`](/references/javascript/api/namespacewindow/#getbylabel)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webviewWindow.ts:111](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L111)
+**Source**: [webviewWindow.ts:111](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L111)
-<a id="getcurrent" name="getcurrent"></a>
+---
##### getCurrent()
@@ -2683,54 +2687,50 @@ Get an instance of `Webview` for the current webview.
###### Returns
-[`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow)
+[`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow)
###### Inherited from
-[`Window`](/references/javascript/api/namespaces/window.md#window).[`getCurrent`](/references/javascript/api/namespaces/window.md#getcurrent)
+[`Window`](/references/javascript/api/namespacewindow/#window).[`getCurrent`](/references/javascript/api/namespacewindow/#getcurrent)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webviewWindow.ts:123](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L123)
+**Source**: [webviewWindow.ts:123](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L123)
## Functions
-<a id="getall-1" name="getall-1"></a>
-
### getAll()
```ts
-function getAll(): WebviewWindow[];
+getAll(): WebviewWindow[]
```
Gets a list of instances of `Webview` for all available webview windows.
-#### Returns
-
-[`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow)[]
-
#### Since
2.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webviewWindow.ts:34](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L34)
+#### Returns
----
+[`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow)[]
-<a id="getcurrent-1" name="getcurrent-1"></a>
+**Source**: [webviewWindow.ts:34](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L34)
+
+---
### getCurrent()
```ts
-function getCurrent(): WebviewWindow;
+getCurrent(): WebviewWindow
```
Get an instance of `Webview` for the current webview window.
-#### Returns
-
-[`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow)
-
#### Since
2.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webviewWindow.ts:23](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L23)
+#### Returns
+
+[`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow)
+
+**Source**: [webviewWindow.ts:23](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webviewWindow.ts#L23)
diff --git a/src/content/docs/references/javascript/api/Namespace.window.md b/src/content/docs/references/javascript/api/Namespace.window.md
index 369d1c47..23a1519a 100644
--- a/src/content/docs/references/javascript/api/Namespace.window.md
+++ b/src/content/docs/references/javascript/api/Namespace.window.md
@@ -9,7 +9,7 @@ Provides APIs to create windows, communicate with other windows and manipulate t
## Window events
-Events can be listened to using [Window.listen](/references/javascript/api/namespaces/window.md#listen):
+Events can be listened to using [Window.listen](/references/javascript/api/namespacewindow/#listen):
```typescript
import { getCurrent } from '@tauri-apps/api/window';
@@ -18,33 +18,53 @@ getCurrent().listen('my-window-event', ({ event, payload }) => {});
## References
-<a id="logicalposition" name="logicalposition"></a>
-
### LogicalPosition
-Re-exports [LogicalPosition](/references/javascript/api/namespaces/dpi.md#logicalposition)
+Re-exports [LogicalPosition](/references/javascript/api/namespacedpi/#logicalposition)
+
+```ts
+LogicalPosition;
+```
+
+**Source**: [window.ts:2266](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2266)
-<a id="logicalsize" name="logicalsize"></a>
+---
### LogicalSize
-Re-exports [LogicalSize](/references/javascript/api/namespaces/dpi.md#logicalsize)
+Re-exports [LogicalSize](/references/javascript/api/namespacedpi/#logicalsize)
+
+```ts
+LogicalSize;
+```
+
+**Source**: [window.ts:2264](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2264)
-<a id="physicalposition" name="physicalposition"></a>
+---
### PhysicalPosition
-Re-exports [PhysicalPosition](/references/javascript/api/namespaces/dpi.md#physicalposition)
+Re-exports [PhysicalPosition](/references/javascript/api/namespacedpi/#physicalposition)
+
+```ts
+PhysicalPosition;
+```
-<a id="physicalsize" name="physicalsize"></a>
+**Source**: [window.ts:2267](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2267)
+
+---
### PhysicalSize
-Re-exports [PhysicalSize](/references/javascript/api/namespaces/dpi.md#physicalsize)
+Re-exports [PhysicalSize](/references/javascript/api/namespacedpi/#physicalsize)
-## Enumerations
+```ts
+PhysicalSize;
+```
+
+**Source**: [window.ts:2265](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2265)
-<a id="effect" name="effect"></a>
+## Enumerations
### Effect
@@ -56,8 +76,6 @@ Platform-specific window effects
#### Enumeration Members
-<a id="acrylic" name="acrylic"></a>
-
##### Acrylic
```ts
@@ -70,11 +88,11 @@ Acrylic: 'acrylic';
This effect has bad performance when resizing/dragging the window on Windows 10 v1903+ and Windows 11 build 22000.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2004](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2004)
+**Source**: [window.ts:2004](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2004)
-<a id="appearancebased" name="appearancebased"></a>
+---
-##### ~~AppearanceBased~~
+##### AppearanceBased
```ts
AppearanceBased: 'appearanceBased';
@@ -86,9 +104,9 @@ A default material appropriate for the view's effectiveAppearance. **macOS 10.14
since macOS 10.14. You should instead choose an appropriate semantic material.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1904](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1904)
+**Source**: [window.ts:1904](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1904)
-<a id="blur" name="blur"></a>
+---
##### Blur
@@ -102,9 +120,9 @@ Blur: 'blur';
This effect has bad performance when resizing/dragging the window on Windows 11 build 22621.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1996](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1996)
+**Source**: [window.ts:1996](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1996)
-<a id="contentbackground" name="contentbackground"></a>
+---
##### ContentBackground
@@ -114,11 +132,11 @@ ContentBackground: 'contentBackground';
**macOS 10.14+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1976](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1976)
+**Source**: [window.ts:1976](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1976)
-<a id="dark" name="dark"></a>
+---
-##### ~~Dark~~
+##### Dark
```ts
Dark: 'dark';
@@ -130,9 +148,9 @@ Dark: 'dark';
since macOS 10.14. Use a semantic material instead.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1916](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1916)
+**Source**: [window.ts:1916](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1916)
-<a id="fullscreenui" name="fullscreenui"></a>
+---
##### FullScreenUI
@@ -142,9 +160,9 @@ FullScreenUI: 'fullScreenUI';
**macOS 10.14+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1968](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1968)
+**Source**: [window.ts:1968](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1968)
-<a id="headerview" name="headerview"></a>
+---
##### HeaderView
@@ -154,9 +172,9 @@ HeaderView: 'headerView';
**macOS 10.14+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1952](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1952)
+**Source**: [window.ts:1952](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1952)
-<a id="hudwindow" name="hudwindow"></a>
+---
##### HudWindow
@@ -166,11 +184,11 @@ HudWindow: 'hudWindow';
**macOS 10.14+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1964](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1964)
+**Source**: [window.ts:1964](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1964)
-<a id="light" name="light"></a>
+---
-##### ~~Light~~
+##### Light
```ts
Light: 'light';
@@ -182,11 +200,11 @@ Light: 'light';
since macOS 10.14. Use a semantic material instead.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1910](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1910)
+**Source**: [window.ts:1910](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1910)
-<a id="mediumlight" name="mediumlight"></a>
+---
-##### ~~MediumLight~~
+##### MediumLight
```ts
MediumLight: 'mediumLight';
@@ -198,9 +216,9 @@ MediumLight: 'mediumLight';
since macOS 10.14. Use a semantic material instead.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1922](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1922)
+**Source**: [window.ts:1922](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1922)
-<a id="menu" name="menu"></a>
+---
##### Menu
@@ -210,9 +228,9 @@ Menu: 'menu';
**macOS 10.11+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1940](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1940)
+**Source**: [window.ts:1940](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1940)
-<a id="mica" name="mica"></a>
+---
##### Mica
@@ -222,9 +240,9 @@ Mica: 'mica';
**Windows 11 Only**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1988](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1988)
+**Source**: [window.ts:1988](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1988)
-<a id="popover" name="popover"></a>
+---
##### Popover
@@ -234,9 +252,9 @@ Popover: 'popover';
**macOS 10.11+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1944](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1944)
+**Source**: [window.ts:1944](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1944)
-<a id="selection" name="selection"></a>
+---
##### Selection
@@ -246,9 +264,9 @@ Selection: 'selection';
**macOS 10.10+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1936](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1936)
+**Source**: [window.ts:1936](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1936)
-<a id="sheet" name="sheet"></a>
+---
##### Sheet
@@ -258,9 +276,9 @@ Sheet: 'sheet';
**macOS 10.14+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1956](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1956)
+**Source**: [window.ts:1956](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1956)
-<a id="sidebar" name="sidebar"></a>
+---
##### Sidebar
@@ -270,9 +288,9 @@ Sidebar: 'sidebar';
**macOS 10.11+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1948](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1948)
+**Source**: [window.ts:1948](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1948)
-<a id="tabbed" name="tabbed"></a>
+---
##### Tabbed
@@ -282,9 +300,9 @@ Tabbed: 'tabbed';
Tabbed effect that matches the system dark perefence **Windows 11 Only**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2008](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2008)
+**Source**: [window.ts:2008](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2008)
-<a id="tabbeddark" name="tabbeddark"></a>
+---
##### TabbedDark
@@ -294,9 +312,9 @@ TabbedDark: 'tabbedDark';
Tabbed effect with dark mode but only if dark mode is enabled on the system **Windows 11 Only**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2012](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2012)
+**Source**: [window.ts:2012](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2012)
-<a id="tabbedlight" name="tabbedlight"></a>
+---
##### TabbedLight
@@ -306,9 +324,9 @@ TabbedLight: 'tabbedLight';
Tabbed effect with light mode **Windows 11 Only**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2016](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2016)
+**Source**: [window.ts:2016](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2016)
-<a id="titlebar" name="titlebar"></a>
+---
##### Titlebar
@@ -318,9 +336,9 @@ Titlebar: 'titlebar';
**macOS 10.10+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1932](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1932)
+**Source**: [window.ts:1932](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1932)
-<a id="tooltip" name="tooltip"></a>
+---
##### Tooltip
@@ -330,11 +348,11 @@ Tooltip: 'tooltip';
**macOS 10.14+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1972](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1972)
+**Source**: [window.ts:1972](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1972)
-<a id="ultradark" name="ultradark"></a>
+---
-##### ~~UltraDark~~
+##### UltraDark
```ts
UltraDark: 'ultraDark';
@@ -346,9 +364,9 @@ UltraDark: 'ultraDark';
since macOS 10.14. Use a semantic material instead.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1928](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1928)
+**Source**: [window.ts:1928](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1928)
-<a id="underpagebackground" name="underpagebackground"></a>
+---
##### UnderPageBackground
@@ -358,9 +376,9 @@ UnderPageBackground: 'underPageBackground';
**macOS 10.14+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1984](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1984)
+**Source**: [window.ts:1984](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1984)
-<a id="underwindowbackground" name="underwindowbackground"></a>
+---
##### UnderWindowBackground
@@ -370,9 +388,9 @@ UnderWindowBackground: 'underWindowBackground';
**macOS 10.14+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1980](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1980)
+**Source**: [window.ts:1980](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1980)
-<a id="windowbackground" name="windowbackground"></a>
+---
##### WindowBackground
@@ -382,12 +400,10 @@ WindowBackground: 'windowBackground';
**macOS 10.14+**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1960](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1960)
+**Source**: [window.ts:1960](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1960)
---
-<a id="effectstate" name="effectstate"></a>
-
### EffectState
Window effect state **macOS only**
@@ -402,8 +418,6 @@ https://developer.apple.com/documentation/appkit/nsvisualeffectview/state
#### Enumeration Members
-<a id="active" name="active"></a>
-
##### Active
```ts
@@ -412,9 +426,9 @@ Active: 'active';
Make window effect state always active **macOS only**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2034](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2034)
+**Source**: [window.ts:2034](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2034)
-<a id="followswindowactivestate" name="followswindowactivestate"></a>
+---
##### FollowsWindowActiveState
@@ -424,9 +438,9 @@ FollowsWindowActiveState: 'followsWindowActiveState';
Make window effect state follow the window's active state **macOS only**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2030](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2030)
+**Source**: [window.ts:2030](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2030)
-<a id="inactive" name="inactive"></a>
+---
##### Inactive
@@ -436,18 +450,14 @@ Inactive: 'inactive';
Make window effect state always inactive **macOS only**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2038](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2038)
+**Source**: [window.ts:2038](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2038)
---
-<a id="progressbarstatus" name="progressbarstatus"></a>
-
### ProgressBarStatus
#### Enumeration Members
-<a id="error" name="error"></a>
-
##### Error
```ts
@@ -456,9 +466,9 @@ Error: 'error';
Error state. **Treated as Normal on linux**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:184](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L184)
+**Source**: [window.ts:184](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L184)
-<a id="indeterminate" name="indeterminate"></a>
+---
##### Indeterminate
@@ -468,9 +478,9 @@ Indeterminate: 'indeterminate';
Indeterminate state. **Treated as Normal on Linux and macOS**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:176](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L176)
+**Source**: [window.ts:176](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L176)
-<a id="none" name="none"></a>
+---
##### None
@@ -480,9 +490,9 @@ None: 'none';
Hide progress bar.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:168](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L168)
+**Source**: [window.ts:168](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L168)
-<a id="normal" name="normal"></a>
+---
##### Normal
@@ -492,9 +502,9 @@ Normal: 'normal';
Normal state.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:172](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L172)
+**Source**: [window.ts:172](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L172)
-<a id="paused" name="paused"></a>
+---
##### Paused
@@ -504,12 +514,10 @@ Paused: 'paused';
Paused state. **Treated as Normal on Linux**
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:180](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L180)
+**Source**: [window.ts:180](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L180)
---
-<a id="userattentiontype" name="userattentiontype"></a>
-
### UserAttentionType
Attention type to request on a window.
@@ -520,8 +528,6 @@ Attention type to request on a window.
#### Enumeration Members
-<a id="critical" name="critical"></a>
-
##### Critical
```ts
@@ -533,9 +539,9 @@ Critical: 1;
- **macOS:** Bounces the dock icon until the application is in focus.
- **Windows:** Flashes both the window and the taskbar button until the application is in focus.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:93](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L93)
+**Source**: [window.ts:93](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L93)
-<a id="informational" name="informational"></a>
+---
##### Informational
@@ -548,19 +554,15 @@ Informational: 2;
- **macOS:** Bounces the dock icon once.
- **Windows:** Flashes the taskbar button until the application is in focus.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:99](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L99)
+**Source**: [window.ts:99](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L99)
## Classes
-<a id="closerequestedevent" name="closerequestedevent"></a>
-
### CloseRequestedEvent
#### Constructors
-<a id="constructors" name="constructors"></a>
-
-##### new CloseRequestedEvent()
+##### constructor()
```ts
new CloseRequestedEvent(event): CloseRequestedEvent
@@ -568,28 +570,26 @@ new CloseRequestedEvent(event): CloseRequestedEvent
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------- |
-| `event` | [`Event`](/references/javascript/api/namespaces/event.md#eventt)\<`null`\> |
+| Parameter | Type |
+| :-------- | :---------------------------------------------------------------------- |
+| `event` | [`Event`](/references/javascript/api/namespaceevent/#event)\< `null` \> |
###### Returns
-[`CloseRequestedEvent`](/references/javascript/api/namespaces/window.md#closerequestedevent)
+[`CloseRequestedEvent`](/references/javascript/api/namespacewindow/#closerequestedevent)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:109](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L109)
+**Source**: [window.ts:109](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L109)
#### Properties
-| Property | Modifier | Type | Default value | Description |
-| :-------------------------------------------------------------------- | :-------- | :---------------------------------------------------------------------- | :------------ | :-------------------------------- |
-| <a id="_preventdefault" name="_preventdefault"></a> `_preventDefault` | `private` | `boolean` | `false` | - |
-| <a id="event" name="event"></a> `event` | `public` | [`EventName`](/references/javascript/api/namespaces/event.md#eventname) | `undefined` | Event name |
-| <a id="id" name="id"></a> `id` | `public` | `number` | `undefined` | Event identifier used to unlisten |
+| Property | Type | Description |
+| :------------------------------------------------------------------------------ | :------------------------------------------------------------------ | :-------------------------------- |
+| `private` <a id="_preventdefault" name="_preventdefault"></a> `_preventDefault` | `boolean` | - |
+| <a id="event" name="event"></a> `event` | [`EventName`](/references/javascript/api/namespaceevent/#eventname) | Event name |
+| <a id="id" name="id"></a> `id` | `number` | Event identifier used to unlisten |
#### Methods
-<a id="ispreventdefault" name="ispreventdefault"></a>
-
##### isPreventDefault()
```ts
@@ -600,9 +600,9 @@ isPreventDefault(): boolean
`boolean`
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:118](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L118)
+**Source**: [window.ts:118](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L118)
-<a id="preventdefault" name="preventdefault"></a>
+---
##### preventDefault()
@@ -614,12 +614,10 @@ preventDefault(): void
`void`
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:114](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L114)
+**Source**: [window.ts:114](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L114)
---
-<a id="window" name="window"></a>
-
### Window
Create new window or get a handle to an existing one.
@@ -652,35 +650,20 @@ unlisten();
2.0.0
-#### Extended by
+#### Extended By
-- [`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow)
+- [`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow)
#### Constructors
-<a id="constructors-1" name="constructors-1"></a>
-
-##### new Window()
+##### constructor()
```ts
-new Window(label, options): Window
+new Window(label, options = {}): Window
```
Creates a new Window.
-###### Parameters
-
-| Parameter | Type | Description |
-| :-------- | :------------------------------------------------------------------------------- | :----------------------------------------------------------- |
-| `label` | `string` | The unique window label. Must be alphanumeric: `a-zA-Z-/:_`. |
-| `options` | [`WindowOptions`](/references/javascript/api/namespaces/window.md#windowoptions) | - |
-
-###### Returns
-
-[`Window`](/references/javascript/api/namespaces/window.md#window)
-
-The [Window](/references/javascript/api/namespaces/window.md#window) instance to communicate with the window.
-
###### Example
```typescript
@@ -694,33 +677,38 @@ appWindow.once('tauri://error', function (e) {
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:283](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L283)
+###### Parameters
+
+| Parameter | Type | Description |
+| :-------- | :--------------------------------------------------------------------------- | :----------------------------------------------------------- |
+| `label` | `string` | The unique window label. Must be alphanumeric: `a-zA-Z-/:_`. |
+| `options` | [`WindowOptions`](/references/javascript/api/namespacewindow/#windowoptions) | - |
+
+###### Returns
+
+[`Window`](/references/javascript/api/namespacewindow/#window)
+
+The [Window](/references/javascript/api/namespacewindow/#window) instance to communicate with the window.
+
+**Source**: [window.ts:283](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L283)
#### Properties
-| Property | Type | Description |
-| :-------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------- |
-| <a id="label" name="label"></a> `label` | `string` | The window label. It is a unique identifier for the window, can be used to reference it later. |
-| <a id="listeners" name="listeners"></a> `listeners` | [`Record ↗️`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`any`\>[]\> | Local event listeners. |
+| Property | Type | Description |
+| :-------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
+| <a id="label" name="label"></a> `label` | `string` | The window label. It is a unique identifier for the window, can be used to reference it later. |
+| <a id="listeners" name="listeners"></a> `listeners` | [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\< `string`, [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `any` \>[] \> | Local event listeners. |
#### Methods
-<a id="center" name="center"></a>
-
##### center()
```ts
-center(): Promise<void>
+center(): Promise< void >
```
Centers the window.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -728,41 +716,41 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().center();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:801](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L801)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:801](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L801)
-<a id="cleareffects" name="cleareffects"></a>
+---
##### clearEffects()
```ts
-clearEffects(): Promise<void>
+clearEffects(): Promise< void >
```
Clear any applied effects if possible.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1152](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1152)
+**Source**: [window.ts:1152](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1152)
-<a id="close" name="close"></a>
+---
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Closes the window.
-Note this emits a closeRequested event so you can intercept it. To force window close, use [Window.destroy](/references/javascript/api/namespaces/window.md#destroy).
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
+Note this emits a closeRequested event so you can intercept it. To force window close, use [Window.destroy](/references/javascript/api/namespacewindow/#destroy).
###### Example
@@ -771,23 +759,23 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().close();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1073](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1073)
+###### Returns
-<a id="destroy" name="destroy"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-##### destroy()
+A promise indicating the success or failure of the operation.
-```ts
-destroy(): Promise<void>
-```
+**Source**: [window.ts:1073](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1073)
-Destroys the window. Behaves like [Window.close](/references/javascript/api/namespaces/window.md#close) but forces the window close instead of emitting a closeRequested event.
+---
-###### Returns
+##### destroy()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+```ts
+destroy(): Promise< void >
+```
-A promise indicating the success or failure of the operation.
+Destroys the window. Behaves like [Window.close](/references/javascript/api/namespacewindow/#close) but forces the window close instead of emitting a closeRequested event.
###### Example
@@ -796,28 +784,23 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().destroy();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1089](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1089)
-
-<a id="emit" name="emit"></a>
+###### Returns
-##### emit()
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-```ts
-emit(event, payload?): Promise<void>
-```
+A promise indicating the success or failure of the operation.
-Emits an event to all [targets](/references/javascript/api/namespaces/event.md#eventtarget).
+**Source**: [window.ts:1089](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1089)
-###### Parameters
+---
-| Parameter | Type | Description |
-| :--------- | :-------- | :---------------------------------------------------------------------------- |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `payload`? | `unknown` | Event payload. |
+##### emit()
-###### Returns
+```ts
+emit(event, payload?): Promise< void >
+```
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+Emits an event to all [targets](/references/javascript/api/namespaceevent/#eventtarget).
###### Example
@@ -829,32 +812,31 @@ await getCurrent().emit('window-loaded', {
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:431](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L431)
+###### Parameters
+
+| Parameter | Type | Description |
+| :--------- | :-------- | :---------------------------------------------------------------------------- |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `payload`? | `unknown` | Event payload. |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+**Source**: [window.ts:431](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L431)
-<a id="emitto" name="emitto"></a>
+---
##### emitTo()
```ts
emitTo(
- target,
- event,
-payload?): Promise<void>
+ target,
+ event,
+ payload?): Promise< void >
```
-Emits an event to all [targets](/references/javascript/api/namespaces/event.md#eventtarget) matching the given target.
-
-###### Parameters
-
-| Parameter | Type | Description |
-| :--------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
-| `target` | `string` \| [`EventTarget`](/references/javascript/api/namespaces/event.md#eventtarget) | Label of the target Window/Webview/WebviewWindow or raw [EventTarget](/references/javascript/api/namespaces/event.md#eventtarget) object. |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `payload`? | `unknown` | Event payload. |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+Emits an event to all [targets](/references/javascript/api/namespaceevent/#eventtarget) matching the given target.
###### Example
@@ -866,24 +848,30 @@ await getCurrent().emit('main', 'window-loaded', {
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:458](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L458)
+###### Parameters
+
+| Parameter | Type | Description |
+| :--------- | :---------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------ |
+| `target` | `string` \| [`EventTarget`](/references/javascript/api/namespaceevent/#eventtarget) | Label of the target Window/Webview/WebviewWindow or raw [EventTarget](/references/javascript/api/namespaceevent/#eventtarget) object. |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `payload`? | `unknown` | Event payload. |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-<a id="hide" name="hide"></a>
+**Source**: [window.ts:458](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L458)
+
+---
##### hide()
```ts
-hide(): Promise<void>
+hide(): Promise< void >
```
Sets the window visibility to false.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -891,24 +879,24 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().hide();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1055](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1055)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:1055](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1055)
-<a id="innerposition" name="innerposition"></a>
+---
##### innerPosition()
```ts
-innerPosition(): Promise<PhysicalPosition>
+innerPosition(): Promise< PhysicalPosition >
```
The position of the top-left hand corner of the window's client area relative to the top-left hand corner of the desktop.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition)\>
-
-The window's inner position.
-
###### Example
```typescript
@@ -916,25 +904,25 @@ import { getCurrent } from '@tauri-apps/api/window';
const position = await getCurrent().innerPosition();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:519](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L519)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) \>
+
+The window's inner position.
+
+**Source**: [window.ts:519](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L519)
-<a id="innersize" name="innersize"></a>
+---
##### innerSize()
```ts
-innerSize(): Promise<PhysicalSize>
+innerSize(): Promise< PhysicalSize >
```
The physical size of the window's client area.
The client area is the content of the window, excluding the title bar and borders.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize)\>
-
-The window's inner size.
-
###### Example
```typescript
@@ -942,14 +930,20 @@ import { getCurrent } from '@tauri-apps/api/window';
const size = await getCurrent().innerSize();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:552](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L552)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) \>
+
+The window's inner size.
+
+**Source**: [window.ts:552](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L552)
-<a id="isclosable" name="isclosable"></a>
+---
##### isClosable()
```ts
-isClosable(): Promise<boolean>
+isClosable(): Promise< boolean >
```
Gets the window’s native close button state.
@@ -958,12 +952,6 @@ Gets the window’s native close button state.
- **iOS / Android:** Unsupported.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window's native close button is enabled or not.
-
###### Example
```typescript
@@ -971,24 +959,24 @@ import { getCurrent } from '@tauri-apps/api/window';
const closable = await getCurrent().isClosable();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:732](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L732)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-<a id="isdecorated" name="isdecorated"></a>
+Whether the window's native close button is enabled or not.
+
+**Source**: [window.ts:732](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L732)
+
+---
##### isDecorated()
```ts
-isDecorated(): Promise<boolean>
+isDecorated(): Promise< boolean >
```
Gets the window's current decorated state.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window is decorated or not.
-
###### Example
```typescript
@@ -996,24 +984,24 @@ import { getCurrent } from '@tauri-apps/api/window';
const decorated = await getCurrent().isDecorated();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:653](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L653)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
+
+Whether the window is decorated or not.
+
+**Source**: [window.ts:653](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L653)
-<a id="isfocused" name="isfocused"></a>
+---
##### isFocused()
```ts
-isFocused(): Promise<boolean>
+isFocused(): Promise< boolean >
```
Gets the window's current focus state.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window is focused or not.
-
###### Example
```typescript
@@ -1021,24 +1009,24 @@ import { getCurrent } from '@tauri-apps/api/window';
const focused = await getCurrent().isFocused();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:637](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L637)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
+
+Whether the window is focused or not.
-<a id="isfullscreen" name="isfullscreen"></a>
+**Source**: [window.ts:637](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L637)
+
+---
##### isFullscreen()
```ts
-isFullscreen(): Promise<boolean>
+isFullscreen(): Promise< boolean >
```
Gets the window's current fullscreen state.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window is in fullscreen mode or not.
-
###### Example
```typescript
@@ -1046,14 +1034,20 @@ import { getCurrent } from '@tauri-apps/api/window';
const fullscreen = await getCurrent().isFullscreen();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:591](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L591)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
+
+Whether the window is in fullscreen mode or not.
+
+**Source**: [window.ts:591](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L591)
-<a id="ismaximizable" name="ismaximizable"></a>
+---
##### isMaximizable()
```ts
-isMaximizable(): Promise<boolean>
+isMaximizable(): Promise< boolean >
```
Gets the window’s native maximize button state.
@@ -1062,12 +1056,6 @@ Gets the window’s native maximize button state.
- **Linux / iOS / Android:** Unsupported.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window's native maximize button is enabled or not.
-
###### Example
```typescript
@@ -1075,24 +1063,24 @@ import { getCurrent } from '@tauri-apps/api/window';
const maximizable = await getCurrent().isMaximizable();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:690](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L690)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-<a id="ismaximized" name="ismaximized"></a>
+Whether the window's native maximize button is enabled or not.
+
+**Source**: [window.ts:690](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L690)
+
+---
##### isMaximized()
```ts
-isMaximized(): Promise<boolean>
+isMaximized(): Promise< boolean >
```
Gets the window's current maximized state.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window is maximized or not.
-
###### Example
```typescript
@@ -1100,14 +1088,20 @@ import { getCurrent } from '@tauri-apps/api/window';
const maximized = await getCurrent().isMaximized();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:621](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L621)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
+
+Whether the window is maximized or not.
+
+**Source**: [window.ts:621](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L621)
-<a id="isminimizable" name="isminimizable"></a>
+---
##### isMinimizable()
```ts
-isMinimizable(): Promise<boolean>
+isMinimizable(): Promise< boolean >
```
Gets the window’s native minimize button state.
@@ -1116,12 +1110,6 @@ Gets the window’s native minimize button state.
- **Linux / iOS / Android:** Unsupported.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window's native minimize button is enabled or not.
-
###### Example
```typescript
@@ -1129,21 +1117,23 @@ import { getCurrent } from '@tauri-apps/api/window';
const minimizable = await getCurrent().isMinimizable();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:711](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L711)
+###### Returns
-<a id="isminimized" name="isminimized"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-##### isMinimized()
+Whether the window's native minimize button is enabled or not.
-```ts
-isMinimized(): Promise<boolean>
-```
+**Source**: [window.ts:711](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L711)
-Gets the window's current minimized state.
+---
-###### Returns
+##### isMinimized()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+```ts
+isMinimized(): Promise< boolean >
+```
+
+Gets the window's current minimized state.
###### Example
@@ -1152,24 +1142,22 @@ import { getCurrent } from '@tauri-apps/api/window';
const minimized = await getCurrent().isMinimized();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:605](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L605)
+###### Returns
-<a id="isresizable" name="isresizable"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
+
+**Source**: [window.ts:605](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L605)
+
+---
##### isResizable()
```ts
-isResizable(): Promise<boolean>
+isResizable(): Promise< boolean >
```
Gets the window's current resizable state.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window is resizable or not.
-
###### Example
```typescript
@@ -1177,24 +1165,24 @@ import { getCurrent } from '@tauri-apps/api/window';
const resizable = await getCurrent().isResizable();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:669](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L669)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
+
+Whether the window is resizable or not.
-<a id="isvisible" name="isvisible"></a>
+**Source**: [window.ts:669](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L669)
+
+---
##### isVisible()
```ts
-isVisible(): Promise<boolean>
+isVisible(): Promise< boolean >
```
Gets the window's current visible state.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-Whether the window is visible or not.
-
###### Example
```typescript
@@ -1202,38 +1190,24 @@ import { getCurrent } from '@tauri-apps/api/window';
const visible = await getCurrent().isVisible();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:748](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L748)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-<a id="listen" name="listen"></a>
+Whether the window is visible or not.
+
+**Source**: [window.ts:748](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L748)
+
+---
##### listen()
```ts
-listen<T>(event, handler): Promise<UnlistenFn>
+listen<T>(event, handler): Promise< UnlistenFn >
```
Listen to an emitted event on this window.
-###### Type parameters
-
-| Type parameter |
-| :------------- |
-| `T` |
-
-###### Parameters
-
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
-| `event` | [`EventName`](/references/javascript/api/namespaces/event.md#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`T`\> | Event handler. |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
-
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-
###### Example
```typescript
@@ -1246,24 +1220,38 @@ const unlisten = await getCurrent().listen<string>('state-changed', (event) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:372](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L372)
+###### Type parameters
+
+| Parameter |
+| :-------- |
+| `T` |
+
+###### Parameters
+
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
+| `event` | [`EventName`](/references/javascript/api/namespaceevent/#eventname) | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `T` \> | Event handler. |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
+
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+
+**Source**: [window.ts:372](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L372)
-<a id="maximize" name="maximize"></a>
+---
##### maximize()
```ts
-maximize(): Promise<void>
+maximize(): Promise< void >
```
Maximizes the window.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -1271,24 +1259,24 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().maximize();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:959](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L959)
+###### Returns
-<a id="minimize" name="minimize"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:959](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L959)
+
+---
##### minimize()
```ts
-minimize(): Promise<void>
+minimize(): Promise< void >
```
Minimizes the window.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -1296,31 +1284,24 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().minimize();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1007](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1007)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:1007](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1007)
-<a id="oncloserequested" name="oncloserequested"></a>
+---
##### onCloseRequested()
```ts
-onCloseRequested(handler): Promise<UnlistenFn>
+onCloseRequested(handler): Promise< UnlistenFn >
```
Listen to window close requested. Emitted when the user requests to closes the window.
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :---------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | (`event`) => `void` \| [`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\> |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
-
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-
###### Example
```typescript
@@ -1338,33 +1319,33 @@ const unlisten = await getCurrent().onCloseRequested(async (event) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1700](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1700)
+###### Parameters
+
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | (`event`) => `void` \| [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \> |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
+
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+
+**Source**: [window.ts:1700](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1700)
-<a id="ondragdropevent" name="ondragdropevent"></a>
+---
##### onDragDropEvent()
```ts
-onDragDropEvent(handler): Promise<UnlistenFn>
+onDragDropEvent(handler): Promise< UnlistenFn >
```
Listen to a file drop event.
The listener is triggered when the user hovers the selected files on the webview,
drops the files or cancels the operation.
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`DragDropEvent`](/references/javascript/api/namespaces/window.md#dragdropevent)\> |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
-
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-
###### Example
```typescript
@@ -1383,30 +1364,30 @@ const unlisten = await getCurrent().onDragDropEvent((event) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1739](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1739)
+###### Parameters
-<a id="onfocuschanged" name="onfocuschanged"></a>
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`DragDropEvent`](/references/javascript/api/namespacewindow/#dragdropevent) \> |
-##### onFocusChanged()
+###### Returns
-```ts
-onFocusChanged(handler): Promise<UnlistenFn>
-```
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
-Listen to window focus change.
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-###### Parameters
+**Source**: [window.ts:1739](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1739)
-| Parameter | Type |
-| :-------- | :-------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`boolean`\> |
+---
-###### Returns
+##### onFocusChanged()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+```ts
+onFocusChanged(handler): Promise< UnlistenFn >
+```
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+Listen to window focus change.
###### Example
@@ -1420,30 +1401,30 @@ const unlisten = await getCurrent().onFocusChanged(({ payload: focused }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1815](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1815)
+###### Parameters
-<a id="onmoved" name="onmoved"></a>
+| Parameter | Type |
+| :-------- | :----------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `boolean` \> |
-##### onMoved()
+###### Returns
-```ts
-onMoved(handler): Promise<UnlistenFn>
-```
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
-Listen to window move.
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-###### Parameters
+**Source**: [window.ts:1815](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1815)
-| Parameter | Type |
-| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition)\> |
+---
-###### Returns
+##### onMoved()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+```ts
+onMoved(handler): Promise< UnlistenFn >
+```
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+Listen to window move.
###### Example
@@ -1457,30 +1438,30 @@ const unlisten = await getCurrent().onMoved(({ payload: position }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1670](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1670)
+###### Parameters
-<a id="onresized" name="onresized"></a>
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) \> |
-##### onResized()
+###### Returns
-```ts
-onResized(handler): Promise<UnlistenFn>
-```
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
-Listen to window resize.
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-###### Parameters
+**Source**: [window.ts:1670](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1670)
-| Parameter | Type |
-| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize)\> |
+---
-###### Returns
+##### onResized()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+```ts
+onResized(handler): Promise< UnlistenFn >
+```
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+Listen to window resize.
###### Example
@@ -1494,14 +1475,27 @@ const unlisten = await getCurrent().onResized(({ payload: size }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1646](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1646)
+###### Parameters
+
+| Parameter | Type |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) \> |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
+
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+
+**Source**: [window.ts:1646](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1646)
-<a id="onscalechanged" name="onscalechanged"></a>
+---
##### onScaleChanged()
```ts
-onScaleChanged(handler): Promise<UnlistenFn>
+onScaleChanged(handler): Promise< UnlistenFn >
```
Listen to window scale change. Emitted when the window's scale factor has changed.
@@ -1511,19 +1505,6 @@ The following user actions can cause DPI changes:
- Changing the display's scale factor (e.g. in Control Panel on Windows).
- Moving the window to a display with a different scale factor.
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`ScaleFactorChanged`](/references/javascript/api/namespaces/window.md#scalefactorchanged)\> |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
-
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-
###### Example
```typescript
@@ -1536,30 +1517,30 @@ const unlisten = await getCurrent().onScaleChanged(({ payload }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1855](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1855)
+###### Parameters
-<a id="onthemechanged" name="onthemechanged"></a>
+| Parameter | Type |
+| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`ScaleFactorChanged`](/references/javascript/api/namespacewindow/#scalefactorchanged) \> |
-##### onThemeChanged()
+###### Returns
-```ts
-onThemeChanged(handler): Promise<UnlistenFn>
-```
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
-Listen to the system theme change.
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-###### Parameters
+**Source**: [window.ts:1855](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1855)
-| Parameter | Type |
-| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<[`Theme`](/references/javascript/api/namespaces/window.md#theme-2)\> |
+---
-###### Returns
+##### onThemeChanged()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+```ts
+onThemeChanged(handler): Promise< UnlistenFn >
+```
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+Listen to the system theme change.
###### Example
@@ -1573,37 +1554,30 @@ const unlisten = await getCurrent().onThemeChanged(({ payload: theme }) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1881](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1881)
+###### Parameters
-<a id="once" name="once"></a>
+| Parameter | Type |
+| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< [`Theme`](/references/javascript/api/namespacewindow/#theme) \> |
-##### once()
-
-```ts
-once<T>(event, handler): Promise<UnlistenFn>
-```
-
-Listen to an emitted event on this window only once.
+###### Returns
-###### Type parameters
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
-| Type parameter |
-| :------------- |
-| `T` |
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
-###### Parameters
+**Source**: [window.ts:1881](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1881)
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
-| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
-| `handler` | [`EventCallback`](/references/javascript/api/namespaces/event.md#eventcallbackt)\<`T`\> | Event handler. |
+---
-###### Returns
+##### once()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`UnlistenFn`](/references/javascript/api/namespaces/event.md#unlistenfn)\>
+```ts
+once<T>(event, handler): Promise< UnlistenFn >
+```
-A promise resolving to a function to unlisten to the event.
-Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+Listen to an emitted event on this window only once.
###### Example
@@ -1617,24 +1591,38 @@ const unlisten = await getCurrent().once<null>('initialized', (event) => {
unlisten();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:407](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L407)
+###### Type parameters
+
+| Parameter |
+| :-------- |
+| `T` |
+
+###### Parameters
+
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
+| `event` | `string` | Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. |
+| `handler` | [`EventCallback`](/references/javascript/api/namespaceevent/#eventcallback)\< `T` \> | Event handler. |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`UnlistenFn`](/references/javascript/api/namespaceevent/#unlistenfn) \>
+
+A promise resolving to a function to unlisten to the event.
+Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted.
+
+**Source**: [window.ts:407](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L407)
-<a id="outerposition" name="outerposition"></a>
+---
##### outerPosition()
```ts
-outerPosition(): Promise<PhysicalPosition>
+outerPosition(): Promise< PhysicalPosition >
```
The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition)\>
-
-The window's outer position.
-
###### Example
```typescript
@@ -1642,25 +1630,25 @@ import { getCurrent } from '@tauri-apps/api/window';
const position = await getCurrent().outerPosition();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:535](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L535)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) \>
+
+The window's outer position.
-<a id="outersize" name="outersize"></a>
+**Source**: [window.ts:535](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L535)
+
+---
##### outerSize()
```ts
-outerSize(): Promise<PhysicalSize>
+outerSize(): Promise< PhysicalSize >
```
The physical size of the entire window.
These dimensions include the title bar and borders. If you don't want that (and you usually don't), use inner_size instead.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize)\>
-
-The window's outer size.
-
###### Example
```typescript
@@ -1668,14 +1656,20 @@ import { getCurrent } from '@tauri-apps/api/window';
const size = await getCurrent().outerSize();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:572](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L572)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) \>
-<a id="requestuserattention" name="requestuserattention"></a>
+The window's outer size.
+
+**Source**: [window.ts:572](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L572)
+
+---
##### requestUserAttention()
```ts
-requestUserAttention(requestType): Promise<void>
+requestUserAttention(requestType): Promise< void >
```
Requests user attention to the window, this has no effect if the application
@@ -1690,43 +1684,37 @@ user attention might not be done automatically by the WM when the window receive
- **macOS:** `null` has no effect.
- **Linux:** Urgency levels have the same effect.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().requestUserAttention();
+```
+
###### Parameters
-| Parameter | Type |
-| :------------ | :------------------------------------------------------------------------------------------------- |
-| `requestType` | `null` \| [`UserAttentionType`](/references/javascript/api/namespaces/window.md#userattentiontype) |
+| Parameter | Type |
+| :------------ | :--------------------------------------------------------------------------------------------- |
+| `requestType` | `null` \| [`UserAttentionType`](/references/javascript/api/namespacewindow/#userattentiontype) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().requestUserAttention();
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:827](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L827)
+**Source**: [window.ts:827](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L827)
-<a id="scalefactor" name="scalefactor"></a>
+---
##### scaleFactor()
```ts
-scaleFactor(): Promise<number>
+scaleFactor(): Promise< number >
```
The scale factor that can be used to map physical pixels to logical pixels.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`number`\>
-
-The window's monitor scale factor.
-
###### Example
```typescript
@@ -1734,18 +1722,31 @@ import { getCurrent } from '@tauri-apps/api/window';
const factor = await getCurrent().scaleFactor();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:503](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L503)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `number` \>
-<a id="setalwaysonbottom" name="setalwaysonbottom"></a>
+The window's monitor scale factor.
+
+**Source**: [window.ts:503](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L503)
+
+---
##### setAlwaysOnBottom()
```ts
-setAlwaysOnBottom(alwaysOnBottom): Promise<void>
+setAlwaysOnBottom(alwaysOnBottom): Promise< void >
```
Whether the window should always be below other windows.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setAlwaysOnBottom(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1754,29 +1755,29 @@ Whether the window should always be below other windows.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setAlwaysOnBottom(true);
-```
+**Source**: [window.ts:1188](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1188)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1188](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1188)
-
-<a id="setalwaysontop" name="setalwaysontop"></a>
+---
##### setAlwaysOnTop()
```ts
-setAlwaysOnTop(alwaysOnTop): Promise<void>
+setAlwaysOnTop(alwaysOnTop): Promise< void >
```
Whether the window should always be on top of other windows.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setAlwaysOnTop(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1785,25 +1786,18 @@ Whether the window should always be on top of other windows.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setAlwaysOnTop(true);
-```
+**Source**: [window.ts:1170](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1170)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1170](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1170)
-
-<a id="setclosable" name="setclosable"></a>
+---
##### setClosable()
```ts
-setClosable(closable): Promise<void>
+setClosable(closable): Promise< void >
```
Sets whether the window's native close button is enabled or not.
@@ -1813,6 +1807,13 @@ Sets whether the window's native close button is enabled or not.
- **Linux:** GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible
- **iOS / Android:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setClosable(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -1821,29 +1822,29 @@ Sets whether the window's native close button is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setClosable(false);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:924](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L924)
+**Source**: [window.ts:924](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L924)
-<a id="setcontentprotected" name="setcontentprotected"></a>
+---
##### setContentProtected()
```ts
-setContentProtected(protected_): Promise<void>
+setContentProtected(protected_): Promise< void >
```
Prevents the window contents from being captured by other apps.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setContentProtected(true);
+```
+
###### Parameters
| Parameter | Type |
@@ -1852,25 +1853,18 @@ Prevents the window contents from being captured by other apps.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setContentProtected(true);
-```
+**Source**: [window.ts:1205](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1205)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1205](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1205)
-
-<a id="setcursorgrab" name="setcursorgrab"></a>
+---
##### setCursorGrab()
```ts
-setCursorGrab(grab): Promise<void>
+setCursorGrab(grab): Promise< void >
```
Grabs the cursor, preventing it from leaving the window.
@@ -1883,6 +1877,13 @@ hide it by yourself if you want so.
- **Linux:** Unsupported.
- **macOS:** This locks the cursor in a fixed location, which looks visually awkward.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setCursorGrab(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1891,87 +1892,80 @@ hide it by yourself if you want so.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setCursorGrab(true);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1449](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1449)
+**Source**: [window.ts:1449](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1449)
-<a id="setcursoricon" name="setcursoricon"></a>
+---
##### setCursorIcon()
```ts
-setCursorIcon(icon): Promise<void>
+setCursorIcon(icon): Promise< void >
```
Modifies the cursor icon of the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setCursorIcon('help');
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :------------------------------------------------------------------------- | :------------------- |
-| `icon` | [`CursorIcon`](/references/javascript/api/namespaces/window.md#cursoricon) | The new cursor icon. |
+| Parameter | Type | Description |
+| :-------- | :--------------------------------------------------------------------- | :------------------- |
+| `icon` | [`CursorIcon`](/references/javascript/api/namespacewindow/#cursoricon) | The new cursor icon. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setCursorIcon('help');
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1491](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1491)
+**Source**: [window.ts:1491](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1491)
-<a id="setcursorposition" name="setcursorposition"></a>
+---
##### setCursorPosition()
```ts
-setCursorPosition(position): Promise<void>
+setCursorPosition(position): Promise< void >
```
Changes the position of the cursor in window coordinates.
+###### Example
+
+```typescript
+import { getCurrent, LogicalPosition } from '@tauri-apps/api/window';
+await getCurrent().setCursorPosition(new LogicalPosition(600, 300));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :--------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- |
-| `position` | [`LogicalPosition`](/references/javascript/api/namespaces/dpi.md#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition) | The new cursor position. |
+| Parameter | Type | Description |
+| :--------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- |
+| `position` | [`LogicalPosition`](/references/javascript/api/namespacedpi/#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) | The new cursor position. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent, LogicalPosition } from '@tauri-apps/api/window';
-await getCurrent().setCursorPosition(new LogicalPosition(600, 300));
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1509](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1509)
+**Source**: [window.ts:1509](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1509)
-<a id="setcursorvisible" name="setcursorvisible"></a>
+---
##### setCursorVisible()
```ts
-setCursorVisible(visible): Promise<void>
+setCursorVisible(visible): Promise< void >
```
Modifies the cursor's visibility.
@@ -1982,6 +1976,13 @@ Modifies the cursor's visibility.
- **macOS:** The cursor is hidden as long as the window has input focus, even if the cursor is
outside of the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setCursorVisible(false);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -1990,29 +1991,29 @@ Modifies the cursor's visibility.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setCursorVisible(false);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1473](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1473)
+**Source**: [window.ts:1473](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1473)
-<a id="setdecorations" name="setdecorations"></a>
+---
##### setDecorations()
```ts
-setDecorations(decorations): Promise<void>
+setDecorations(decorations): Promise< void >
```
Whether the window should have borders and bars.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setDecorations(false);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -2021,57 +2022,44 @@ Whether the window should have borders and bars.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setDecorations(false);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1106](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1106)
+**Source**: [window.ts:1106](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1106)
-<a id="seteffects" name="seteffects"></a>
+---
##### setEffects()
```ts
-setEffects(effects): Promise<void>
+setEffects(effects): Promise< void >
```
Set window effects.
###### Parameters
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------- |
-| `effects` | [`Effects`](/references/javascript/api/namespaces/window.md#effects) |
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------- |
+| `effects` | [`Effects`](/references/javascript/api/namespacewindow/#effects) |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1142](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1142)
+**Source**: [window.ts:1142](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1142)
-<a id="setfocus" name="setfocus"></a>
+---
##### setFocus()
```ts
-setFocus(): Promise<void>
+setFocus(): Promise< void >
```
Bring the window to front and focus.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -2079,18 +2067,31 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().setFocus();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1375](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1375)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:1375](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1375)
-<a id="setfullscreen" name="setfullscreen"></a>
+---
##### setFullscreen()
```ts
-setFullscreen(fullscreen): Promise<void>
+setFullscreen(fullscreen): Promise< void >
```
Sets the window fullscreen state.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setFullscreen(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -2099,41 +2100,22 @@ Sets the window fullscreen state.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setFullscreen(true);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1358](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1358)
+**Source**: [window.ts:1358](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1358)
-<a id="seticon" name="seticon"></a>
+---
##### setIcon()
```ts
-setIcon(icon): Promise<void>
+setIcon(icon): Promise< void >
```
Sets the window icon.
-###### Parameters
-
-| Parameter | Type | Description |
-| :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- |
-| `icon` | \| `string` \| `number`[] \| [`ArrayBuffer ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaces/image.md#image) | Icon bytes or path to the icon file. |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -2149,18 +2131,37 @@ To enable it, change your Cargo.toml file:
tauri = { version = "...", features = ["...", "image-png"] }
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1399](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1399)
+###### Parameters
+
+| Parameter | Type | Description |
+| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- |
+| `icon` | `string` \| `number`[] \| [`ArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) \| [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) \| [`Image`](/references/javascript/api/namespaceimage/#image) | Icon bytes or path to the icon file. |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:1399](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1399)
-<a id="setignorecursorevents" name="setignorecursorevents"></a>
+---
##### setIgnoreCursorEvents()
```ts
-setIgnoreCursorEvents(ignore): Promise<void>
+setIgnoreCursorEvents(ignore): Promise< void >
```
Changes the cursor events behavior.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setIgnoreCursorEvents(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -2169,56 +2170,49 @@ Changes the cursor events behavior.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setIgnoreCursorEvents(true);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1545](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1545)
+**Source**: [window.ts:1545](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1545)
-<a id="setmaxsize" name="setmaxsize"></a>
+---
##### setMaxSize()
```ts
-setMaxSize(size): Promise<void>
+setMaxSize(size): Promise< void >
```
Sets the window maximum inner size. If the `size` argument is undefined, the constraint is unset.
+###### Example
+
+```typescript
+import { getCurrent, LogicalSize } from '@tauri-apps/api/window';
+await getCurrent().setMaxSize(new LogicalSize(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- |
-| `size` | `undefined` \| `null` \| [`LogicalSize`](/references/javascript/api/namespaces/dpi.md#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize) | The logical or physical inner size, or `null` to unset the constraint. |
+| Parameter | Type | Description |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------- |
+| `size` | `undefined` \| `null` \| [`LogicalSize`](/references/javascript/api/namespacedpi/#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) | The logical or physical inner size, or `null` to unset the constraint. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent, LogicalSize } from '@tauri-apps/api/window';
-await getCurrent().setMaxSize(new LogicalSize(600, 500));
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1288](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1288)
+**Source**: [window.ts:1288](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1288)
-<a id="setmaximizable" name="setmaximizable"></a>
+---
##### setMaximizable()
```ts
-setMaximizable(maximizable): Promise<void>
+setMaximizable(maximizable): Promise< void >
```
Sets whether the window's native maximize button is enabled or not.
@@ -2229,6 +2223,13 @@ If resizable is set to false, this setting is ignored.
- **macOS:** Disables the "zoom" button in the window titlebar, which is also used to enter fullscreen mode.
- **Linux / iOS / Android:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setMaximizable(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -2237,56 +2238,49 @@ If resizable is set to false, this setting is ignored.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setMaximizable(false);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:879](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L879)
+**Source**: [window.ts:879](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L879)
-<a id="setminsize" name="setminsize"></a>
+---
##### setMinSize()
```ts
-setMinSize(size): Promise<void>
+setMinSize(size): Promise< void >
```
Sets the window minimum inner size. If the `size` argument is not provided, the constraint is unset.
+###### Example
+
+```typescript
+import { getCurrent, PhysicalSize } from '@tauri-apps/api/window';
+await getCurrent().setMinSize(new PhysicalSize(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- |
-| `size` | `undefined` \| `null` \| [`LogicalSize`](/references/javascript/api/namespaces/dpi.md#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize) | The logical or physical inner size, or `null` to unset the constraint. |
+| Parameter | Type | Description |
+| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------- |
+| `size` | `undefined` \| `null` \| [`LogicalSize`](/references/javascript/api/namespacedpi/#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) | The logical or physical inner size, or `null` to unset the constraint. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent, PhysicalSize } from '@tauri-apps/api/window';
-await getCurrent().setMinSize(new PhysicalSize(600, 500));
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1253](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1253)
+**Source**: [window.ts:1253](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1253)
-<a id="setminimizable" name="setminimizable"></a>
+---
##### setMinimizable()
```ts
-setMinimizable(minimizable): Promise<void>
+setMinimizable(minimizable): Promise< void >
```
Sets whether the window's native minimize button is enabled or not.
@@ -2295,6 +2289,13 @@ Sets whether the window's native minimize button is enabled or not.
- **Linux / iOS / Android:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setMinimizable(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -2303,56 +2304,49 @@ Sets whether the window's native minimize button is enabled or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setMinimizable(false);
-```
+**Source**: [window.ts:901](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L901)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:901](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L901)
-
-<a id="setposition" name="setposition"></a>
+---
##### setPosition()
```ts
-setPosition(position): Promise<void>
+setPosition(position): Promise< void >
```
Sets the window outer position.
+###### Example
+
+```typescript
+import { getCurrent, LogicalPosition } from '@tauri-apps/api/window';
+await getCurrent().setPosition(new LogicalPosition(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :--------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------- |
-| `position` | [`LogicalPosition`](/references/javascript/api/namespaces/dpi.md#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition) | The new position, in logical or physical pixels. |
+| Parameter | Type | Description |
+| :--------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------- |
+| `position` | [`LogicalPosition`](/references/javascript/api/namespacedpi/#logicalposition) \| [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) | The new position, in logical or physical pixels. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent, LogicalPosition } from '@tauri-apps/api/window';
-await getCurrent().setPosition(new LogicalPosition(600, 500));
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1323](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1323)
+**Source**: [window.ts:1323](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1323)
-<a id="setprogressbar" name="setprogressbar"></a>
+---
##### setProgressBar()
```ts
-setProgressBar(state): Promise<void>
+setProgressBar(state): Promise< void >
```
Sets the taskbar progress state.
@@ -2360,19 +2354,7 @@ Sets the taskbar progress state.
#### Platform-specific
- **Linux / macOS**: Progress bar is app-wide and not specific to this window.
-- **Linux**: Only supported desktop environments with `libunity` (e.g. GNOME).
-
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------- |
-| `state` | [`ProgressBarState`](/references/javascript/api/namespaces/window.md#progressbarstate) |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
+- **Linux**: Only supported desktop environments with `libunity` (e.g. GNOME).
###### Example
@@ -2384,18 +2366,37 @@ await getCurrent().setProgressBar({
});
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1604](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1604)
+###### Parameters
+
+| Parameter | Type |
+| :-------- | :--------------------------------------------------------------------------------- |
+| `state` | [`ProgressBarState`](/references/javascript/api/namespacewindow/#progressbarstate) |
+
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:1604](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1604)
-<a id="setresizable" name="setresizable"></a>
+---
##### setResizable()
```ts
-setResizable(resizable): Promise<void>
+setResizable(resizable): Promise< void >
```
Updates the window resizable flag.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setResizable(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -2404,25 +2405,18 @@ Updates the window resizable flag.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setResizable(false);
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:855](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L855)
+**Source**: [window.ts:855](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L855)
-<a id="setshadow" name="setshadow"></a>
+---
##### setShadow()
```ts
-setShadow(enable): Promise<void>
+setShadow(enable): Promise< void >
```
Whether or not the window should have shadow.
@@ -2435,6 +2429,13 @@ Whether or not the window should have shadow.
and on Windows 11, it will have a rounded corners.
- **Linux:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setShadow(false);
+```
+
###### Parameters
| Parameter | Type |
@@ -2443,56 +2444,49 @@ Whether or not the window should have shadow.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setShadow(false);
-```
+**Source**: [window.ts:1132](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1132)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1132](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1132)
-
-<a id="setsize" name="setsize"></a>
+---
##### setSize()
```ts
-setSize(size): Promise<void>
+setSize(size): Promise< void >
```
Resizes the window with a new inner size.
+###### Example
+
+```typescript
+import { getCurrent, LogicalSize } from '@tauri-apps/api/window';
+await getCurrent().setSize(new LogicalSize(600, 500));
+```
+
###### Parameters
-| Parameter | Type | Description |
-| :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------- |
-| `size` | [`LogicalSize`](/references/javascript/api/namespaces/dpi.md#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize) | The logical or physical inner size. |
+| Parameter | Type | Description |
+| :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------- |
+| `size` | [`LogicalSize`](/references/javascript/api/namespacedpi/#logicalsize) \| [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) | The logical or physical inner size. |
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent, LogicalSize } from '@tauri-apps/api/window';
-await getCurrent().setSize(new LogicalSize(600, 500));
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1223](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1223)
+**Source**: [window.ts:1223](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1223)
-<a id="setskiptaskbar" name="setskiptaskbar"></a>
+---
##### setSkipTaskbar()
```ts
-setSkipTaskbar(skip): Promise<void>
+setSkipTaskbar(skip): Promise< void >
```
Whether the window icon should be hidden from the taskbar or not.
@@ -2501,6 +2495,13 @@ Whether the window icon should be hidden from the taskbar or not.
- **macOS:** Unsupported.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setSkipTaskbar(true);
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -2509,29 +2510,29 @@ Whether the window icon should be hidden from the taskbar or not.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setSkipTaskbar(true);
-```
+**Source**: [window.ts:1423](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1423)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1423](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1423)
-
-<a id="settitle" name="settitle"></a>
+---
##### setTitle()
```ts
-setTitle(title): Promise<void>
+setTitle(title): Promise< void >
```
Sets the window title.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().setTitle('Tauri');
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -2540,25 +2541,18 @@ Sets the window title.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().setTitle('Tauri');
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:942](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L942)
+**Source**: [window.ts:942](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L942)
-<a id="setvisibleonallworkspaces" name="setvisibleonallworkspaces"></a>
+---
##### setVisibleOnAllWorkspaces()
```ts
-setVisibleOnAllWorkspaces(visible): Promise<void>
+setVisibleOnAllWorkspaces(visible): Promise< void >
```
Sets whether the window should be visible on all workspaces or virtual desktops.
@@ -2567,6 +2561,10 @@ Sets whether the window should be visible on all workspaces or virtual desktops.
- **Windows / iOS / Android:** Unsupported.
+###### Since
+
+2.0.0
+
###### Parameters
| Parameter | Type |
@@ -2575,30 +2573,20 @@ Sets whether the window should be visible on all workspaces or virtual desktops.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-###### Since
-
-2.0.0
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1620](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1620)
+**Source**: [window.ts:1620](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1620)
-<a id="show" name="show"></a>
+---
##### show()
```ts
-show(): Promise<void>
+show(): Promise< void >
```
Sets the window visibility to true.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -2606,24 +2594,24 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().show();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1039](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1039)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:1039](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1039)
-<a id="startdragging" name="startdragging"></a>
+---
##### startDragging()
```ts
-startDragging(): Promise<void>
+startDragging(): Promise< void >
```
Starts dragging the window.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -2631,18 +2619,31 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().startDragging();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1562](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1562)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-<a id="startresizedragging" name="startresizedragging"></a>
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:1562](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1562)
+
+---
##### startResizeDragging()
```ts
-startResizeDragging(direction): Promise<void>
+startResizeDragging(direction): Promise< void >
```
Starts resize-dragging the window.
+###### Example
+
+```typescript
+import { getCurrent } from '@tauri-apps/api/window';
+await getCurrent().startResizeDragging();
+```
+
###### Parameters
| Parameter | Type |
@@ -2651,25 +2652,18 @@ Starts resize-dragging the window.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-###### Example
-
-```typescript
-import { getCurrent } from '@tauri-apps/api/window';
-await getCurrent().startResizeDragging();
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1578](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1578)
+**Source**: [window.ts:1578](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1578)
-<a id="theme" name="theme"></a>
+---
##### theme()
```ts
-theme(): Promise<null | Theme>
+theme(): Promise< null | Theme >
```
Gets the window's current theme.
@@ -2678,12 +2672,6 @@ Gets the window's current theme.
- **macOS:** Theme was introduced on macOS 10.14. Returns `light` on macOS 10.13 and below.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| [`Theme`](/references/javascript/api/namespaces/window.md#theme-2)\>
-
-The window theme.
-
###### Example
```typescript
@@ -2691,22 +2679,24 @@ import { getCurrent } from '@tauri-apps/api/window';
const theme = await getCurrent().theme();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:783](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L783)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`Theme`](/references/javascript/api/namespacewindow/#theme) \>
+
+The window theme.
-<a id="title" name="title"></a>
+**Source**: [window.ts:783](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L783)
+
+---
##### title()
```ts
-title(): Promise<string>
+title(): Promise< string >
```
Gets the window's current title.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
###### Example
```typescript
@@ -2714,24 +2704,22 @@ import { getCurrent } from '@tauri-apps/api/window';
const title = await getCurrent().title();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:762](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L762)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
+
+**Source**: [window.ts:762](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L762)
-<a id="togglemaximize" name="togglemaximize"></a>
+---
##### toggleMaximize()
```ts
-toggleMaximize(): Promise<void>
+toggleMaximize(): Promise< void >
```
Toggles the window maximized state.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -2739,24 +2727,24 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().toggleMaximize();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:991](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L991)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-<a id="unmaximize" name="unmaximize"></a>
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:991](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L991)
+
+---
##### unmaximize()
```ts
-unmaximize(): Promise<void>
+unmaximize(): Promise< void >
```
Unmaximizes the window.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -2764,24 +2752,24 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().unmaximize();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:975](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L975)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [window.ts:975](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L975)
-<a id="unminimize" name="unminimize"></a>
+---
##### unminimize()
```ts
-unminimize(): Promise<void>
+unminimize(): Promise< void >
```
Unminimizes the window.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
-A promise indicating the success or failure of the operation.
-
###### Example
```typescript
@@ -2789,9 +2777,15 @@ import { getCurrent } from '@tauri-apps/api/window';
await getCurrent().unminimize();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1023](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1023)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
-<a id="getall" name="getall"></a>
+**Source**: [window.ts:1023](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1023)
+
+---
##### getAll()
@@ -2803,11 +2797,11 @@ Gets a list of instances of `Window` for all available windows.
###### Returns
-[`Window`](/references/javascript/api/namespaces/window.md#window)[]
+[`Window`](/references/javascript/api/namespacewindow/#window)[]
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:330](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L330)
+**Source**: [window.ts:330](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L330)
-<a id="getbylabel" name="getbylabel"></a>
+---
##### getByLabel()
@@ -2817,6 +2811,13 @@ static getByLabel(label): null | Window
Gets the Window associated with the given label.
+###### Example
+
+```typescript
+import { Window } from '@tauri-apps/api/window';
+const mainWindow = Window.getByLabel('main');
+```
+
###### Parameters
| Parameter | Type | Description |
@@ -2825,20 +2826,13 @@ Gets the Window associated with the given label.
###### Returns
-`null` \| [`Window`](/references/javascript/api/namespaces/window.md#window)
+`null` \| [`Window`](/references/javascript/api/namespacewindow/#window)
The Window instance to communicate with the window or null if the window doesn't exist.
-###### Example
-
-```typescript
-import { Window } from '@tauri-apps/api/window';
-const mainWindow = Window.getByLabel('main');
-```
+**Source**: [window.ts:316](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L316)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:316](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L316)
-
-<a id="getcurrent" name="getcurrent"></a>
+---
##### getCurrent()
@@ -2850,26 +2844,20 @@ Get an instance of `Window` for the current window.
###### Returns
-[`Window`](/references/javascript/api/namespaces/window.md#window)
+[`Window`](/references/javascript/api/namespacewindow/#window)
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:323](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L323)
+**Source**: [window.ts:323](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L323)
-<a id="getfocusedwindow" name="getfocusedwindow"></a>
+---
##### getFocusedWindow()
```ts
-static getFocusedWindow(): Promise<null | Window>
+static getFocusedWindow(): Promise< null | Window >
```
Gets the focused window.
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| [`Window`](/references/javascript/api/namespaces/window.md#window)\>
-
-The Window instance or `undefined` if there is not any focused window.
-
###### Example
```typescript
@@ -2877,25 +2865,27 @@ import { Window } from '@tauri-apps/api/window';
const focusedWindow = Window.getFocusedWindow();
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:344](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L344)
+###### Returns
-## Interfaces
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| [`Window`](/references/javascript/api/namespacewindow/#window) \>
+
+The Window instance or `undefined` if there is not any focused window.
-<a id="dragdroppayload" name="dragdroppayload"></a>
+**Source**: [window.ts:344](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L344)
+
+## Interfaces
### DragDropPayload
#### Properties
-| Property | Type |
-| :----------------------------------------------- | :---------------------------------------------------------------------------------- |
-| <a id="paths" name="paths"></a> `paths` | `string`[] |
-| <a id="position" name="position"></a> `position` | [`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition) |
+| Property | Type |
+| :----------------------------------------------- | :------------------------------------------------------------------------------ |
+| <a id="paths" name="paths"></a> `paths` | `string`[] |
+| <a id="position" name="position"></a> `position` | [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) |
---
-<a id="effects" name="effects"></a>
-
### Effects
The window effects configuration object
@@ -2906,17 +2896,15 @@ The window effects configuration object
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------ | :--------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="color" name="color"></a> `color?` | [`Color`](/references/javascript/api/namespaces/window.md#color-1) | Window effect color. Affects [Effect.Blur](/references/javascript/api/namespaces/window.md#blur) and [Effect.Acrylic](/references/javascript/api/namespaces/window.md#acrylic) only<br />on Windows 10 v1903+. Doesn't have any effect on Windows 7 or Windows 11. |
-| <a id="effects-1" name="effects-1"></a> `effects` | [`Effect`](/references/javascript/api/namespaces/window.md#effect)[] | List of Window effects to apply to the Window.<br />Conflicting effects will apply the first one and ignore the rest. |
-| <a id="radius" name="radius"></a> `radius?` | `number` | Window effect corner radius **macOS Only** |
-| <a id="state" name="state"></a> `state?` | [`EffectState`](/references/javascript/api/namespaces/window.md#effectstate) | Window effect state **macOS Only** |
+| Property | Type | Description |
+| :-------------------------------------------- | :----------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="color" name="color"></a> `color`? | [`Color`](/references/javascript/api/namespacewindow/#color) | Window effect color. Affects [Effect.Blur](/references/javascript/api/namespacewindow/#blur) and [Effect.Acrylic](/references/javascript/api/namespacewindow/#acrylic) only<br />on Windows 10 v1903+. Doesn't have any effect on Windows 7 or Windows 11. |
+| <a id="effects" name="effects"></a> `effects` | [`Effect`](/references/javascript/api/namespacewindow/#effect)[] | List of Window effects to apply to the Window.<br />Conflicting effects will apply the first one and ignore the rest. |
+| <a id="radius" name="radius"></a> `radius`? | `number` | Window effect corner radius **macOS Only** |
+| <a id="state" name="state"></a> `state`? | [`EffectState`](/references/javascript/api/namespacewindow/#effectstate) | Window effect state **macOS Only** |
---
-<a id="monitor" name="monitor"></a>
-
### Monitor
Allows you to retrieve information about a given monitor.
@@ -2927,30 +2915,26 @@ Allows you to retrieve information about a given monitor.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------------------ | :---------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- |
-| <a id="name" name="name"></a> `name` | `null` \| `string` | Human-readable name of the monitor |
-| <a id="position-1" name="position-1"></a> `position` | [`PhysicalPosition`](/references/javascript/api/namespaces/dpi.md#physicalposition) | the Top-left corner position of the monitor relative to the larger full screen area. |
-| <a id="scalefactor-1" name="scalefactor-1"></a> `scaleFactor` | `number` | The scale factor that can be used to map physical pixels to logical pixels. |
-| <a id="size" name="size"></a> `size` | [`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize) | The monitor's resolution. |
+| Property | Type | Description |
+| :-------------------------------------------------------- | :------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------- |
+| <a id="name" name="name"></a> `name` | `null` \| `string` | Human-readable name of the monitor |
+| <a id="position" name="position"></a> `position` | [`PhysicalPosition`](/references/javascript/api/namespacedpi/#physicalposition) | the Top-left corner position of the monitor relative to the larger full screen area. |
+| <a id="scalefactor" name="scalefactor"></a> `scaleFactor` | `number` | The scale factor that can be used to map physical pixels to logical pixels. |
+| <a id="size" name="size"></a> `size` | [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) | The monitor's resolution. |
---
-<a id="progressbarstate" name="progressbarstate"></a>
-
### ProgressBarState
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------ | :--------------------------------------------------------------------------------------- | :----------------------------------------------------------------------- |
-| <a id="progress" name="progress"></a> `progress?` | `number` | The progress bar progress. This can be a value ranging from `0` to `100` |
-| <a id="status" name="status"></a> `status?` | [`ProgressBarStatus`](/references/javascript/api/namespaces/window.md#progressbarstatus) | The progress bar status. |
+| Property | Type | Description |
+| :------------------------------------------------ | :----------------------------------------------------------------------------------- | :----------------------------------------------------------------------- |
+| <a id="progress" name="progress"></a> `progress`? | `number` | The progress bar progress. This can be a value ranging from `0` to `100` |
+| <a id="status" name="status"></a> `status`? | [`ProgressBarStatus`](/references/javascript/api/namespacewindow/#progressbarstatus) | The progress bar status. |
---
-<a id="scalefactorchanged" name="scalefactorchanged"></a>
-
### ScaleFactorChanged
The payload for the `scaleChange` event.
@@ -2961,15 +2945,13 @@ The payload for the `scaleChange` event.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------------------ | :-------------------------------------------------------------------------- | :--------------------------- |
-| <a id="scalefactor-2" name="scalefactor-2"></a> `scaleFactor` | `number` | The new window scale factor. |
-| <a id="size-1" name="size-1"></a> `size` | [`PhysicalSize`](/references/javascript/api/namespaces/dpi.md#physicalsize) | The new window size |
+| Property | Type | Description |
+| :-------------------------------------------------------- | :---------------------------------------------------------------------- | :--------------------------- |
+| <a id="scalefactor" name="scalefactor"></a> `scaleFactor` | `number` | The new window scale factor. |
+| <a id="size" name="size"></a> `size` | [`PhysicalSize`](/references/javascript/api/namespacedpi/#physicalsize) | The new window size |
---
-<a id="windowoptions" name="windowoptions"></a>
-
### WindowOptions
Configuration for the window to create.
@@ -2980,48 +2962,46 @@ Configuration for the window to create.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="alwaysonbottom" name="alwaysonbottom"></a> `alwaysOnBottom?` | `boolean` | Whether the window should always be below other windows. |
-| <a id="alwaysontop" name="alwaysontop"></a> `alwaysOnTop?` | `boolean` | Whether the window should always be on top of other windows or not. |
-| <a id="center-1" name="center-1"></a> `center?` | `boolean` | Show window in the center of the screen.. |
-| <a id="closable" name="closable"></a> `closable?` | `boolean` | Whether the window's native close button is enabled or not. Defaults to `true`. |
-| <a id="contentprotected" name="contentprotected"></a> `contentProtected?` | `boolean` | Prevents the window contents from being captured by other apps. |
-| <a id="decorations" name="decorations"></a> `decorations?` | `boolean` | Whether the window should have borders and bars or not. |
-| <a id="focus" name="focus"></a> `focus?` | `boolean` | Whether the window will be initially focused or not. |
-| <a id="fullscreen" name="fullscreen"></a> `fullscreen?` | `boolean` | Whether the window is in fullscreen mode or not. |
-| <a id="height" name="height"></a> `height?` | `number` | The initial height. |
-| <a id="hiddentitle" name="hiddentitle"></a> `hiddenTitle?` | `boolean` | If `true`, sets the window title to be hidden on macOS. |
-| <a id="maxheight" name="maxheight"></a> `maxHeight?` | `number` | The maximum height. Only applies if `maxWidth` is also set. |
-| <a id="maxwidth" name="maxwidth"></a> `maxWidth?` | `number` | The maximum width. Only applies if `maxHeight` is also set. |
-| <a id="maximizable" name="maximizable"></a> `maximizable?` | `boolean` | Whether the window's native maximize button is enabled or not. Defaults to `true`. |
-| <a id="maximized" name="maximized"></a> `maximized?` | `boolean` | Whether the window should be maximized upon creation or not. |
-| <a id="minheight" name="minheight"></a> `minHeight?` | `number` | The minimum height. Only applies if `minWidth` is also set. |
-| <a id="minwidth" name="minwidth"></a> `minWidth?` | `number` | The minimum width. Only applies if `minHeight` is also set. |
-| <a id="minimizable" name="minimizable"></a> `minimizable?` | `boolean` | Whether the window's native minimize button is enabled or not. Defaults to `true`. |
-| <a id="parent" name="parent"></a> `parent?` | `string` \| [`Window`](/references/javascript/api/namespaces/window.md#window) \| [`WebviewWindow`](/references/javascript/api/namespaces/webviewWindow.md#webviewwindow) | Sets a parent to the window to be created. Can be either a [`Window`](/references/javascript/api/namespaces/window.md#window) or a label of the window.<br /><br />#### Platform-specific<br /><br />- **Windows**: This sets the passed parent as an owner window to the window to be created.<br /> From [MSDN owned windows docs](https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#owned-windows):<br /> - An owned window is always above its owner in the z-order.<br /> - The system automatically destroys an owned window when its owner is destroyed.<br /> - An owned window is hidden when its owner is minimized.<br />- **Linux**: This makes the new window transient for parent, see <https://docs.gtk.org/gtk3/method.Window.set_transient_for.html><br />- **macOS**: This adds the window as a child of parent, see <https://developer.apple.com/documentation/appkit/nswindow/1419152-addchildwindow?language=objc> |
-| <a id="resizable" name="resizable"></a> `resizable?` | `boolean` | Whether the window is resizable or not. |
-| <a id="shadow" name="shadow"></a> `shadow?` | `boolean` | Whether or not the window has shadow.<br /><br />#### Platform-specific<br /><br />- **Windows:**<br /> - `false` has no effect on decorated window, shadows are always ON.<br /> - `true` will make ndecorated window have a 1px white border,<br />and on Windows 11, it will have a rounded corners.<br />- **Linux:** Unsupported.<br /><br />**Since**<br />2.0.0 |
-| <a id="skiptaskbar" name="skiptaskbar"></a> `skipTaskbar?` | `boolean` | Whether or not the window icon should be added to the taskbar. |
-| <a id="tabbingidentifier" name="tabbingidentifier"></a> `tabbingIdentifier?` | `string` | Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS.<br /><br />Windows with the same tabbing identifier will be grouped together.<br />If the tabbing identifier is not set, automatic tabbing will be disabled. |
-| <a id="theme-1" name="theme-1"></a> `theme?` | [`Theme`](/references/javascript/api/namespaces/window.md#theme-2) | The initial window theme. Defaults to the system theme.<br /><br />Only implemented on Windows and macOS 10.14+. |
-| <a id="title-1" name="title-1"></a> `title?` | `string` | Window title. |
-| <a id="titlebarstyle" name="titlebarstyle"></a> `titleBarStyle?` | [`TitleBarStyle`](/references/javascript/api/namespaces/window.md#titlebarstyle-1) | The style of the macOS title bar. |
-| <a id="transparent" name="transparent"></a> `transparent?` | `boolean` | Whether the window is transparent or not.<br />Note that on `macOS` this requires the `macos-private-api` feature flag, enabled under `tauri.conf.json > app > macOSPrivateApi`.<br />WARNING: Using private APIs on `macOS` prevents your application from being accepted to the `App Store`. |
-| <a id="visible" name="visible"></a> `visible?` | `boolean` | Whether the window should be immediately visible upon creation or not. |
-| <a id="visibleonallworkspaces" name="visibleonallworkspaces"></a> `visibleOnAllWorkspaces?` | `boolean` | Whether the window should be visible on all workspaces or virtual desktops.<br /><br />## Platform-specific<br /><br />- **Windows / iOS / Android:** Unsupported.<br /><br />**Since**<br />2.0.0 |
-| <a id="width" name="width"></a> `width?` | `number` | The initial width. |
-| <a id="x" name="x"></a> `x?` | `number` | The initial vertical position. Only applies if `y` is also set. |
-| <a id="y" name="y"></a> `y?` | `number` | The initial horizontal position. Only applies if `x` is also set. |
+| Property | Type | Description |
+| :------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="alwaysonbottom" name="alwaysonbottom"></a> `alwaysOnBottom`? | `boolean` | Whether the window should always be below other windows. |
+| <a id="alwaysontop" name="alwaysontop"></a> `alwaysOnTop`? | `boolean` | Whether the window should always be on top of other windows or not. |
+| <a id="center" name="center"></a> `center`? | `boolean` | Show window in the center of the screen.. |
+| <a id="closable" name="closable"></a> `closable`? | `boolean` | Whether the window's native close button is enabled or not. Defaults to `true`. |
+| <a id="contentprotected" name="contentprotected"></a> `contentProtected`? | `boolean` | Prevents the window contents from being captured by other apps. |
+| <a id="decorations" name="decorations"></a> `decorations`? | `boolean` | Whether the window should have borders and bars or not. |
+| <a id="focus" name="focus"></a> `focus`? | `boolean` | Whether the window will be initially focused or not. |
+| <a id="fullscreen" name="fullscreen"></a> `fullscreen`? | `boolean` | Whether the window is in fullscreen mode or not. |
+| <a id="height" name="height"></a> `height`? | `number` | The initial height. |
+| <a id="hiddentitle" name="hiddentitle"></a> `hiddenTitle`? | `boolean` | If `true`, sets the window title to be hidden on macOS. |
+| <a id="maxheight" name="maxheight"></a> `maxHeight`? | `number` | The maximum height. Only applies if `maxWidth` is also set. |
+| <a id="maxwidth" name="maxwidth"></a> `maxWidth`? | `number` | The maximum width. Only applies if `maxHeight` is also set. |
+| <a id="maximizable" name="maximizable"></a> `maximizable`? | `boolean` | Whether the window's native maximize button is enabled or not. Defaults to `true`. |
+| <a id="maximized" name="maximized"></a> `maximized`? | `boolean` | Whether the window should be maximized upon creation or not. |
+| <a id="minheight" name="minheight"></a> `minHeight`? | `number` | The minimum height. Only applies if `minWidth` is also set. |
+| <a id="minwidth" name="minwidth"></a> `minWidth`? | `number` | The minimum width. Only applies if `minHeight` is also set. |
+| <a id="minimizable" name="minimizable"></a> `minimizable`? | `boolean` | Whether the window's native minimize button is enabled or not. Defaults to `true`. |
+| <a id="parent" name="parent"></a> `parent`? | `string` \| [`Window`](/references/javascript/api/namespacewindow/#window) \| [`WebviewWindow`](/references/javascript/api/namespacewebviewwindow/#webviewwindow) | Sets a parent to the window to be created. Can be either a [`Window`](/references/javascript/api/namespacewindow/#window) or a label of the window.<br /><br />#### Platform-specific<br /><br />- **Windows**: This sets the passed parent as an owner window to the window to be created.<br /> From [MSDN owned windows docs](https://docs.microsoft.com/en-us/windows/win32/winmsg/window-features#owned-windows):<br /> - An owned window is always above its owner in the z-order.<br /> - The system automatically destroys an owned window when its owner is destroyed.<br /> - An owned window is hidden when its owner is minimized.<br />- **Linux**: This makes the new window transient for parent, see \<https://docs.gtk.org/gtk3/method.Window.set_transient_for.html\><br />- **macOS**: This adds the window as a child of parent, see \<https://developer.apple.com/documentation/appkit/nswindow/1419152-addchildwindow?language=objc\> |
+| <a id="resizable" name="resizable"></a> `resizable`? | `boolean` | Whether the window is resizable or not. |
+| <a id="shadow" name="shadow"></a> `shadow`? | `boolean` | Whether or not the window has shadow.<br /><br />#### Platform-specific<br /><br />- **Windows:**<br /> - `false` has no effect on decorated window, shadows are always ON.<br /> - `true` will make ndecorated window have a 1px white border,<br />and on Windows 11, it will have a rounded corners.<br />- **Linux:** Unsupported.<br /><br />**Since**<br /><br />2.0.0 |
+| <a id="skiptaskbar" name="skiptaskbar"></a> `skipTaskbar`? | `boolean` | Whether or not the window icon should be added to the taskbar. |
+| <a id="tabbingidentifier" name="tabbingidentifier"></a> `tabbingIdentifier`? | `string` | Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS.<br /><br />Windows with the same tabbing identifier will be grouped together.<br />If the tabbing identifier is not set, automatic tabbing will be disabled. |
+| <a id="theme" name="theme"></a> `theme`? | [`Theme`](/references/javascript/api/namespacewindow/#theme) | The initial window theme. Defaults to the system theme.<br /><br />Only implemented on Windows and macOS 10.14+. |
+| <a id="title" name="title"></a> `title`? | `string` | Window title. |
+| <a id="titlebarstyle" name="titlebarstyle"></a> `titleBarStyle`? | [`TitleBarStyle`](/references/javascript/api/namespacewindow/#titlebarstyle) | The style of the macOS title bar. |
+| <a id="transparent" name="transparent"></a> `transparent`? | `boolean` | Whether the window is transparent or not.<br />Note that on `macOS` this requires the `macos-private-api` feature flag, enabled under `tauri.conf.json > app > macOSPrivateApi`.<br />WARNING: Using private APIs on `macOS` prevents your application from being accepted to the `App Store`. |
+| <a id="visible" name="visible"></a> `visible`? | `boolean` | Whether the window should be immediately visible upon creation or not. |
+| <a id="visibleonallworkspaces" name="visibleonallworkspaces"></a> `visibleOnAllWorkspaces`? | `boolean` | Whether the window should be visible on all workspaces or virtual desktops.<br /><br />## Platform-specific<br /><br />- **Windows / iOS / Android:** Unsupported.<br /><br />**Since**<br /><br />2.0.0 |
+| <a id="width" name="width"></a> `width`? | `number` | The initial width. |
+| <a id="x" name="x"></a> `x`? | `number` | The initial vertical position. Only applies if `y` is also set. |
+| <a id="y" name="y"></a> `y`? | `number` | The initial horizontal position. Only applies if `x` is also set. |
## Type Aliases
-<a id="color-1" name="color-1"></a>
-
### Color
```ts
-type Color: [number, number, number, number];
+Color: [number, number, number, number];
```
an array RGBA colors. Each value has minimum of 0 and maximum of 255.
@@ -3030,109 +3010,94 @@ an array RGBA colors. Each value has minimum of 0 and maximum of 255.
2.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:1891](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1891)
+**Source**: [window.ts:1891](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L1891)
---
-<a id="cursoricon" name="cursoricon"></a>
-
### CursorIcon
```ts
-type CursorIcon:
- | "default"
- | "crosshair"
- | "hand"
- | "arrow"
- | "move"
- | "text"
- | "wait"
- | "help"
- | "progress"
- | "notAllowed"
- | "contextMenu"
- | "cell"
- | "verticalText"
- | "alias"
- | "copy"
- | "noDrop"
- | "grab"
- | "grabbing"
- | "allScroll"
- | "zoomIn"
- | "zoomOut"
- | "eResize"
- | "nResize"
- | "neResize"
- | "nwResize"
- | "sResize"
- | "seResize"
- | "swResize"
- | "wResize"
- | "ewResize"
- | "nsResize"
- | "neswResize"
- | "nwseResize"
- | "colResize"
- | "rowResize";
-```
-
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:123](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L123)
-
----
-
-<a id="dragdropevent" name="dragdropevent"></a>
+CursorIcon: 'default' |
+ 'crosshair' |
+ 'hand' |
+ 'arrow' |
+ 'move' |
+ 'text' |
+ 'wait' |
+ 'help' |
+ 'progress' |
+ 'notAllowed' |
+ 'contextMenu' |
+ 'cell' |
+ 'verticalText' |
+ 'alias' |
+ 'copy' |
+ 'noDrop' |
+ 'grab' |
+ 'grabbing' |
+ 'allScroll' |
+ 'zoomIn' |
+ 'zoomOut' |
+ 'eResize' |
+ 'nResize' |
+ 'neResize' |
+ 'nwResize' |
+ 'sResize' |
+ 'seResize' |
+ 'swResize' |
+ 'wResize' |
+ 'ewResize' |
+ 'nsResize' |
+ 'neswResize' |
+ 'nwseResize' |
+ 'colResize' |
+ 'rowResize';
+```
+
+**Source**: [window.ts:123](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L123)
+
+---
### DragDropEvent
```ts
-type DragDropEvent: object & DragDropPayload | object & DragOverPayload | object & DragDropPayload | object;
+DragDropEvent: {type: "dragged";} & DragDropPayload | {type: "dragOver";} & DragOverPayload | {type: "dropped";} & DragDropPayload | {type: "cancelled";}
```
The drag and drop event types.
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/webview.ts:46](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L46)
+**Source**: [webview.ts:46](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/webview.ts#L46)
---
-<a id="theme-2" name="theme-2"></a>
-
### Theme
```ts
-type Theme: "light" | "dark";
+Theme: 'light' | 'dark';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L57)
+**Source**: [window.ts:57](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L57)
---
-<a id="titlebarstyle-1" name="titlebarstyle-1"></a>
-
### TitleBarStyle
```ts
-type TitleBarStyle: "visible" | "transparent" | "overlay";
+TitleBarStyle: 'visible' | 'transparent' | 'overlay';
```
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:58](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L58)
+**Source**: [window.ts:58](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L58)
## Functions
-<a id="availablemonitors" name="availablemonitors"></a>
-
### availableMonitors()
```ts
-function availableMonitors(): Promise<Monitor[]>;
+availableMonitors(): Promise< Monitor[] >
```
Returns the list of all the monitors available on the system.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Monitor`](/references/javascript/api/namespaces/window.md#monitor)[]\>
-
#### Example
```typescript
@@ -3144,25 +3109,23 @@ const monitors = availableMonitors();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2253](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2253)
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Monitor`](/references/javascript/api/namespacewindow/#monitor)[] \>
----
+**Source**: [window.ts:2253](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2253)
-<a id="currentmonitor" name="currentmonitor"></a>
+---
### currentMonitor()
```ts
-function currentMonitor(): Promise<Monitor | null>;
+currentMonitor(): Promise< Monitor | null >
```
Returns the monitor on which the window currently resides.
Returns `null` if current monitor can't be detected.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Monitor`](/references/javascript/api/namespaces/window.md#monitor) \| `null`\>
-
#### Example
```typescript
@@ -3174,69 +3137,63 @@ const monitor = currentMonitor();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2220](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2220)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Monitor`](/references/javascript/api/namespacewindow/#monitor) \| `null` \>
-<a id="getall-1" name="getall-1"></a>
+**Source**: [window.ts:2220](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2220)
+
+---
### getAll()
```ts
-function getAll(): Window[];
+getAll(): Window[]
```
Gets a list of instances of `Window` for all available windows.
-#### Returns
-
-[`Window`](/references/javascript/api/namespaces/window.md#window)[]
-
#### Since
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:215](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L215)
+#### Returns
+
+[`Window`](/references/javascript/api/namespacewindow/#window)[]
----
+**Source**: [window.ts:215](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L215)
-<a id="getcurrent-1" name="getcurrent-1"></a>
+---
### getCurrent()
```ts
-function getCurrent(): Window;
+getCurrent(): Window
```
Get an instance of `Window` for the current window.
-#### Returns
-
-[`Window`](/references/javascript/api/namespaces/window.md#window)
-
#### Since
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:203](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L203)
+#### Returns
----
+[`Window`](/references/javascript/api/namespacewindow/#window)
-<a id="primarymonitor" name="primarymonitor"></a>
+**Source**: [window.ts:203](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L203)
+
+---
### primaryMonitor()
```ts
-function primaryMonitor(): Promise<Monitor | null>;
+primaryMonitor(): Promise< Monitor | null >
```
Returns the primary monitor of the system.
Returns `null` if it can't identify any monitor as a primary one.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Monitor`](/references/javascript/api/namespaces/window.md#monitor) \| `null`\>
-
#### Example
```typescript
@@ -3248,4 +3205,8 @@ const monitor = primaryMonitor();
1.0.0
-**Source**: [../../../Users/lorenzolewis/Developer/tauri-docs-1/packages/tauri/tooling/api/src/window.ts:2237](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2237)
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Monitor`](/references/javascript/api/namespacewindow/#monitor) \| `null` \>
+
+**Source**: [window.ts:2237](https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/window.ts#L2237)
diff --git a/src/content/docs/references/javascript/api/index.md b/src/content/docs/references/javascript/api/index.md
index 8bc51005..37e3f9c0 100644
--- a/src/content/docs/references/javascript/api/index.md
+++ b/src/content/docs/references/javascript/api/index.md
@@ -15,16 +15,18 @@ This module exposes all other modules as an object where the key is the module n
import { event, window, path } from '@tauri-apps/api';
```
-## Namespaces
+## Index
-- [app](/references/javascript/api/Namespace.app.md)
-- [core](/references/javascript/api/Namespace.core.md)
-- [dpi](/references/javascript/api/Namespace.dpi.md)
-- [event](/references/javascript/api/Namespace.event.md)
-- [image](/references/javascript/api/Namespace.image.md)
-- [menu](/references/javascript/api/Namespace.menu.md)
-- [path](/references/javascript/api/Namespace.path.md)
-- [tray](/references/javascript/api/Namespace.tray.md)
-- [webview](/references/javascript/api/Namespace.webview.md)
-- [webviewWindow](/references/javascript/api/Namespace.webviewWindow.md)
-- [window](/references/javascript/api/Namespace.window.md)
+### Namespaces
+
+- [app](/references/javascript/api/namespaceapp/)
+- [core](/references/javascript/api/namespacecore/)
+- [dpi](/references/javascript/api/namespacedpi/)
+- [event](/references/javascript/api/namespaceevent/)
+- [image](/references/javascript/api/namespaceimage/)
+- [menu](/references/javascript/api/namespacemenu/)
+- [path](/references/javascript/api/namespacepath/)
+- [tray](/references/javascript/api/namespacetray/)
+- [webview](/references/javascript/api/namespacewebview/)
+- [webviewWindow](/references/javascript/api/namespacewebviewwindow/)
+- [window](/references/javascript/api/namespacewindow/)
diff --git a/src/content/docs/references/javascript/authenticator.md b/src/content/docs/references/javascript/authenticator.md
index ce536edc..9c3cc6f7 100644
--- a/src/content/docs/references/javascript/authenticator.md
+++ b/src/content/docs/references/javascript/authenticator.md
@@ -7,15 +7,11 @@ sidebar:
## Classes
-<a id="authenticator" name="authenticator"></a>
-
### Authenticator
#### Constructors
-<a id="constructors" name="constructors"></a>
-
-##### new Authenticator()
+##### constructor()
```ts
new Authenticator(): Authenticator
@@ -23,30 +19,28 @@ new Authenticator(): Authenticator
###### Returns
-[`Authenticator`](/references/javascript/authenticator.md#authenticator)
+[`Authenticator`](/references/javascript/authenticator/#authenticator)
#### Methods
-<a id="init" name="init"></a>
-
##### init()
```ts
-init(): Promise<void>
+init(): Promise< void >
```
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/authenticator/guest-js/index.ts:8](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L8)
+**Source**: [index.ts:8](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L8)
-<a id="register" name="register"></a>
+---
##### register()
```ts
-register(challenge, application): Promise<string>
+register(challenge, application): Promise< string >
```
###### Parameters
@@ -58,19 +52,19 @@ register(challenge, application): Promise<string>
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/authenticator/guest-js/index.ts:12](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L12)
+**Source**: [index.ts:12](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L12)
-<a id="sign" name="sign"></a>
+---
##### sign()
```ts
sign(
- challenge,
- application,
-keyHandle): Promise<string>
+ challenge,
+ application,
+ keyHandle): Promise< string >
```
###### Parameters
@@ -83,20 +77,20 @@ keyHandle): Promise<string>
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/authenticator/guest-js/index.ts:34](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L34)
+**Source**: [index.ts:34](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L34)
-<a id="verifyregistration" name="verifyregistration"></a>
+---
##### verifyRegistration()
```ts
verifyRegistration(
- challenge,
- application,
- registerData,
-clientData): Promise<string>
+ challenge,
+ application,
+ registerData,
+ clientData): Promise< string >
```
###### Parameters
@@ -110,22 +104,22 @@ clientData): Promise<string>
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/authenticator/guest-js/index.ts:20](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L20)
+**Source**: [index.ts:20](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L20)
-<a id="verifysignature" name="verifysignature"></a>
+---
##### verifySignature()
```ts
verifySignature(
- challenge,
- application,
- signData,
- clientData,
- keyHandle,
-pubkey): Promise<number>
+ challenge,
+ application,
+ signData,
+ clientData,
+ keyHandle,
+ pubkey): Promise< number >
```
###### Parameters
@@ -141,6 +135,6 @@ pubkey): Promise<number>
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`number`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `number` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/authenticator/guest-js/index.ts:47](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L47)
+**Source**: [index.ts:47](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/authenticator/guest-js/index.ts#L47)
diff --git a/src/content/docs/references/javascript/autostart.md b/src/content/docs/references/javascript/autostart.md
index b315ed84..8a444af9 100644
--- a/src/content/docs/references/javascript/autostart.md
+++ b/src/content/docs/references/javascript/autostart.md
@@ -7,48 +7,42 @@ sidebar:
## Functions
-<a id="disable" name="disable"></a>
-
### disable()
```ts
-function disable(): Promise<void>;
+disable(): Promise< void >
```
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/autostart/guest-js/index.ts:15](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/autostart/guest-js/index.ts#L15)
+**Source**: [index.ts:15](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/autostart/guest-js/index.ts#L15)
---
-<a id="enable" name="enable"></a>
-
### enable()
```ts
-function enable(): Promise<void>;
+enable(): Promise< void >
```
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/autostart/guest-js/index.ts:11](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/autostart/guest-js/index.ts#L11)
+**Source**: [index.ts:11](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/autostart/guest-js/index.ts#L11)
---
-<a id="isenabled" name="isenabled"></a>
-
### isEnabled()
```ts
-function isEnabled(): Promise<boolean>;
+isEnabled(): Promise< boolean >
```
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/autostart/guest-js/index.ts:7](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/autostart/guest-js/index.ts#L7)
+**Source**: [index.ts:7](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/autostart/guest-js/index.ts#L7)
diff --git a/src/content/docs/references/javascript/barcode-scanner.md b/src/content/docs/references/javascript/barcode-scanner.md
index 2fd693a0..0fb6c11d 100644
--- a/src/content/docs/references/javascript/barcode-scanner.md
+++ b/src/content/docs/references/javascript/barcode-scanner.md
@@ -7,23 +7,19 @@ sidebar:
## Enumerations
-<a id="format" name="format"></a>
-
### Format
#### Enumeration Members
-<a id="aztec" name="aztec"></a>
-
##### Aztec
```ts
Aztec: 'AZTEC';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:20](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L20)
+**Source**: [index.ts:20](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L20)
-<a id="codabar" name="codabar"></a>
+---
##### Codabar
@@ -31,9 +27,9 @@ Aztec: 'AZTEC';
Codabar: 'CODABAR';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:18](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L18)
+**Source**: [index.ts:18](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L18)
-<a id="code128" name="code128"></a>
+---
##### Code128
@@ -41,9 +37,9 @@ Codabar: 'CODABAR';
Code128: 'CODE_128';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:17](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L17)
+**Source**: [index.ts:17](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L17)
-<a id="code39" name="code39"></a>
+---
##### Code39
@@ -51,9 +47,9 @@ Code128: 'CODE_128';
Code39: 'CODE_39';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:15](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L15)
+**Source**: [index.ts:15](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L15)
-<a id="code93" name="code93"></a>
+---
##### Code93
@@ -61,9 +57,9 @@ Code39: 'CODE_39';
Code93: 'CODE_93';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:16](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L16)
+**Source**: [index.ts:16](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L16)
-<a id="datamatrix" name="datamatrix"></a>
+---
##### DataMatrix
@@ -71,9 +67,9 @@ Code93: 'CODE_93';
DataMatrix: 'DATA_MATRIX';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:21](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L21)
+**Source**: [index.ts:21](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L21)
-<a id="ean13" name="ean13"></a>
+---
##### EAN13
@@ -81,9 +77,9 @@ DataMatrix: 'DATA_MATRIX';
EAN13: 'EAN_13';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:14](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L14)
+**Source**: [index.ts:14](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L14)
-<a id="ean8" name="ean8"></a>
+---
##### EAN8
@@ -91,9 +87,9 @@ EAN13: 'EAN_13';
EAN8: 'EAN_8';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:13](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L13)
+**Source**: [index.ts:13](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L13)
-<a id="itf" name="itf"></a>
+---
##### ITF
@@ -101,9 +97,9 @@ EAN8: 'EAN_8';
ITF: 'ITF';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:19](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L19)
+**Source**: [index.ts:19](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L19)
-<a id="pdf417" name="pdf417"></a>
+---
##### PDF417
@@ -111,9 +107,9 @@ ITF: 'ITF';
PDF417: 'PDF_417';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:22](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L22)
+**Source**: [index.ts:22](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L22)
-<a id="qrcode" name="qrcode"></a>
+---
##### QRCode
@@ -121,9 +117,9 @@ PDF417: 'PDF_417';
QRCode: 'QR_CODE';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:10](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L10)
+**Source**: [index.ts:10](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L10)
-<a id="upc_a" name="upc_a"></a>
+---
##### UPC_A
@@ -131,9 +127,9 @@ QRCode: 'QR_CODE';
UPC_A: 'UPC_A';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:11](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L11)
+**Source**: [index.ts:11](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L11)
-<a id="upc_e" name="upc_e"></a>
+---
##### UPC_E
@@ -141,140 +137,124 @@ UPC_A: 'UPC_A';
UPC_E: 'UPC_E';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:12](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L12)
+**Source**: [index.ts:12](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L12)
## Interfaces
-<a id="scanoptions" name="scanoptions"></a>
-
### ScanOptions
#### Properties
-| Property | Type |
-| :--------------------------------------------------------------------- | :------------------------------------------------------------- |
-| <a id="cameradirection" name="cameradirection"></a> `cameraDirection?` | `"back"` \| `"front"` |
-| <a id="formats" name="formats"></a> `formats?` | [`Format`](/references/javascript/barcode-scanner.md#format)[] |
-| <a id="windowed" name="windowed"></a> `windowed?` | `boolean` |
+| Property | Type |
+| :--------------------------------------------------------------------- | :----------------------------------------------------------- |
+| <a id="cameradirection" name="cameradirection"></a> `cameraDirection`? | `"back"` \| `"front"` |
+| <a id="formats" name="formats"></a> `formats`? | [`Format`](/references/javascript/barcode-scanner/#format)[] |
+| <a id="windowed" name="windowed"></a> `windowed`? | `boolean` |
---
-<a id="scanned" name="scanned"></a>
-
### Scanned
#### Properties
-| Property | Type |
-| :--------------------------------------------- | :----------------------------------------------------------- |
-| <a id="bounds" name="bounds"></a> `bounds` | `unknown` |
-| <a id="content" name="content"></a> `content` | `string` |
-| <a id="format-1" name="format-1"></a> `format` | [`Format`](/references/javascript/barcode-scanner.md#format) |
+| Property | Type |
+| :-------------------------------------------- | :--------------------------------------------------------- |
+| <a id="bounds" name="bounds"></a> `bounds` | `unknown` |
+| <a id="content" name="content"></a> `content` | `string` |
+| <a id="format" name="format"></a> `format` | [`Format`](/references/javascript/barcode-scanner/#format) |
## Type Aliases
-<a id="permissionstate" name="permissionstate"></a>
-
### PermissionState
```ts
-type PermissionState: "granted" | "denied" | "prompt";
+PermissionState: 'granted' | 'denied' | 'prompt';
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:7](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L7)
+**Source**: [index.ts:7](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L7)
## Functions
-<a id="cancel" name="cancel"></a>
-
### cancel()
```ts
-function cancel(): Promise<void>;
+cancel(): Promise< void >
```
Cancel the current scan process.
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:48](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L48)
+**Source**: [index.ts:48](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L48)
---
-<a id="checkpermissions" name="checkpermissions"></a>
-
### checkPermissions()
```ts
-function checkPermissions(): Promise<PermissionState>;
+checkPermissions(): Promise< PermissionState >
```
Get permission state.
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PermissionState`](/references/javascript/barcode-scanner.md#permissionstate)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PermissionState`](/references/javascript/barcode-scanner/#permissionstate) \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:55](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L55)
+**Source**: [index.ts:55](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L55)
---
-<a id="openappsettings" name="openappsettings"></a>
-
### openAppSettings()
```ts
-function openAppSettings(): Promise<void>;
+openAppSettings(): Promise< void >
```
Open application settings. Useful if permission was denied and the user must manually enable it.
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:73](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L73)
+**Source**: [index.ts:73](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L73)
---
-<a id="requestpermissions" name="requestpermissions"></a>
-
### requestPermissions()
```ts
-function requestPermissions(): Promise<PermissionState>;
+requestPermissions(): Promise< PermissionState >
```
Request permissions to use the camera.
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PermissionState`](/references/javascript/barcode-scanner.md#permissionstate)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`PermissionState`](/references/javascript/barcode-scanner/#permissionstate) \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:64](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L64)
+**Source**: [index.ts:64](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L64)
---
-<a id="scan" name="scan"></a>
-
### scan()
```ts
-function scan(options?): Promise<Scanned>;
+scan(options?): Promise< Scanned >
```
Start scanning.
#### Parameters
-| Parameter | Type | Description |
-| :--------- | :--------------------------------------------------------------------- | :---------- |
-| `options`? | [`ScanOptions`](/references/javascript/barcode-scanner.md#scanoptions) | |
+| Parameter | Type | Description |
+| :--------- | :------------------------------------------------------------------- | :---------- |
+| `options`? | [`ScanOptions`](/references/javascript/barcode-scanner/#scanoptions) | |
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Scanned`](/references/javascript/barcode-scanner.md#scanned)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Scanned`](/references/javascript/barcode-scanner/#scanned) \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/barcode-scanner/guest-js/index.ts:41](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L41)
+**Source**: [index.ts:41](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L41)
diff --git a/src/content/docs/references/javascript/biometric.md b/src/content/docs/references/javascript/biometric.md
index 608ace5b..d86f935d 100644
--- a/src/content/docs/references/javascript/biometric.md
+++ b/src/content/docs/references/javascript/biometric.md
@@ -7,23 +7,19 @@ sidebar:
## Enumerations
-<a id="biometrytype" name="biometrytype"></a>
-
### BiometryType
#### Enumeration Members
-<a id="faceid" name="faceid"></a>
-
##### FaceID
```ts
FaceID: 2;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/biometric/guest-js/index.ts:12](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L12)
+**Source**: [index.ts:12](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L12)
-<a id="iris" name="iris"></a>
+---
##### Iris
@@ -31,9 +27,9 @@ FaceID: 2;
Iris: 3;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/biometric/guest-js/index.ts:14](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L14)
+**Source**: [index.ts:14](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L14)
-<a id="none" name="none"></a>
+---
##### None
@@ -41,9 +37,9 @@ Iris: 3;
None: 0;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/biometric/guest-js/index.ts:8](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L8)
+**Source**: [index.ts:8](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L8)
-<a id="touchid" name="touchid"></a>
+---
##### TouchID
@@ -51,49 +47,43 @@ None: 0;
TouchID: 1;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/biometric/guest-js/index.ts:10](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L10)
+**Source**: [index.ts:10](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L10)
## Interfaces
-<a id="authoptions" name="authoptions"></a>
-
### AuthOptions
#### Properties
| Property | Type |
| :--------------------------------------------------------------------------------------- | :-------- |
-| <a id="allowdevicecredential" name="allowdevicecredential"></a> `allowDeviceCredential?` | `boolean` |
-| <a id="canceltitle" name="canceltitle"></a> `cancelTitle?` | `string` |
-| <a id="confirmationrequired" name="confirmationrequired"></a> `confirmationRequired?` | `boolean` |
-| <a id="fallbacktitle" name="fallbacktitle"></a> `fallbackTitle?` | `string` |
-| <a id="maxattemps" name="maxattemps"></a> `maxAttemps?` | `number` |
-| <a id="subtitle" name="subtitle"></a> `subtitle?` | `string` |
-| <a id="title" name="title"></a> `title?` | `string` |
+| <a id="allowdevicecredential" name="allowdevicecredential"></a> `allowDeviceCredential`? | `boolean` |
+| <a id="canceltitle" name="canceltitle"></a> `cancelTitle`? | `string` |
+| <a id="confirmationrequired" name="confirmationrequired"></a> `confirmationRequired`? | `boolean` |
+| <a id="fallbacktitle" name="fallbacktitle"></a> `fallbackTitle`? | `string` |
+| <a id="maxattemps" name="maxattemps"></a> `maxAttemps`? | `number` |
+| <a id="subtitle" name="subtitle"></a> `subtitle`? | `string` |
+| <a id="title" name="title"></a> `title`? | `string` |
---
-<a id="status" name="status"></a>
-
### Status
#### Properties
-| Property | Type |
-| :--------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="biometrytype-1" name="biometrytype-1"></a> `biometryType` | [`BiometryType`](/references/javascript/biometric.md#biometrytype) |
-| <a id="error" name="error"></a> `error?` | `string` |
-| <a id="errorcode" name="errorcode"></a> `errorCode?` | \| `"appCancel"` \| `"authenticationFailed"` \| `"invalidContext"` \| `"notInteractive"` \| `"passcodeNotSet"` \| `"systemCancel"` \| `"userCancel"` \| `"userFallback"` \| `"biometryLockout"` \| `"biometryNotAvailable"` \| `"biometryNotEnrolled"` |
-| <a id="isavailable" name="isavailable"></a> `isAvailable` | `boolean` |
+| Property | Type |
+| :----------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="biometrytype" name="biometrytype"></a> `biometryType` | [`BiometryType`](/references/javascript/biometric/#biometrytype) |
+| <a id="error" name="error"></a> `error`? | `string` |
+| <a id="errorcode" name="errorcode"></a> `errorCode`? | `"appCancel"` \| `"authenticationFailed"` \| `"invalidContext"` \| `"notInteractive"` \| `"passcodeNotSet"` \| `"systemCancel"` \| `"userCancel"` \| `"userFallback"` \| `"biometryLockout"` \| `"biometryNotAvailable"` \| `"biometryNotEnrolled"` |
+| <a id="isavailable" name="isavailable"></a> `isAvailable` | `boolean` |
## Functions
-<a id="authenticate" name="authenticate"></a>
-
### authenticate()
```ts
-function authenticate(reason, options?): Promise<void>;
+authenticate(reason, options?): Promise< void >
```
Prompts the user for authentication using the system interface (touchID, faceID or Android Iris).
@@ -106,33 +96,31 @@ await authenticate('Open your wallet');
#### Parameters
-| Parameter | Type | Description |
-| :--------- | :--------------------------------------------------------------- | :---------- |
-| `reason` | `string` | |
-| `options`? | [`AuthOptions`](/references/javascript/biometric.md#authoptions) | |
+| Parameter | Type | Description |
+| :--------- | :------------------------------------------------------------- | :---------- |
+| `reason` | `string` | |
+| `options`? | [`AuthOptions`](/references/javascript/biometric/#authoptions) | |
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/biometric/guest-js/index.ts:69](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L69)
+**Source**: [index.ts:69](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L69)
---
-<a id="checkstatus" name="checkstatus"></a>
-
### checkStatus()
```ts
-function checkStatus(): Promise<Status>;
+checkStatus(): Promise< Status >
```
Checks if the biometric authentication is available.
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Status`](/references/javascript/biometric.md#status)\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`Status`](/references/javascript/biometric/#status) \>
a promise resolving to an object containing all the information about the status of the biometry.
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/biometric/guest-js/index.ts:53](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L53)
+**Source**: [index.ts:53](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/biometric/guest-js/index.ts#L53)
diff --git a/src/content/docs/references/javascript/cli.md b/src/content/docs/references/javascript/cli.md
index e4dbb642..394f5a1d 100644
--- a/src/content/docs/references/javascript/cli.md
+++ b/src/content/docs/references/javascript/cli.md
@@ -9,8 +9,6 @@ Parse arguments from your Command Line Interface.
## Interfaces
-<a id="argmatch" name="argmatch"></a>
-
### ArgMatch
#### Since
@@ -26,8 +24,6 @@ Parse arguments from your Command Line Interface.
---
-<a id="climatches" name="climatches"></a>
-
### CliMatches
#### Since
@@ -36,15 +32,13 @@ Parse arguments from your Command Line Interface.
#### Properties
-| Property | Type |
-| :----------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="args" name="args"></a> `args` | [`Record ↗️`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, [`ArgMatch`](/references/javascript/cli.md#argmatch)\> |
-| <a id="subcommand" name="subcommand"></a> `subcommand` | `null` \| [`SubcommandMatch`](/references/javascript/cli.md#subcommandmatch) |
+| Property | Type |
+| :----------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| <a id="args" name="args"></a> `args` | [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\< `string`, [`ArgMatch`](/references/javascript/cli/#argmatch) \> |
+| <a id="subcommand" name="subcommand"></a> `subcommand` | `null` \| [`SubcommandMatch`](/references/javascript/cli/#subcommandmatch) |
---
-<a id="subcommandmatch" name="subcommandmatch"></a>
-
### SubcommandMatch
#### Since
@@ -53,27 +47,21 @@ Parse arguments from your Command Line Interface.
#### Properties
-| Property | Type |
-| :-------------------------------------------- | :------------------------------------------------------- |
-| <a id="matches" name="matches"></a> `matches` | [`CliMatches`](/references/javascript/cli.md#climatches) |
-| <a id="name" name="name"></a> `name` | `string` |
+| Property | Type |
+| :-------------------------------------------- | :----------------------------------------------------- |
+| <a id="matches" name="matches"></a> `matches` | [`CliMatches`](/references/javascript/cli/#climatches) |
+| <a id="name" name="name"></a> `name` | `string` |
## Functions
-<a id="getmatches" name="getmatches"></a>
-
### getMatches()
```ts
-function getMatches(): Promise<CliMatches>;
+getMatches(): Promise< CliMatches >
```
Parse the arguments provided to the current process and get the matches using the configuration defined [`tauri.cli`](https://tauri.app/v1/api/config/#tauriconfig.cli) in `tauri.conf.json`
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`CliMatches`](/references/javascript/cli.md#climatches)\>
-
#### Example
```typescript
@@ -95,4 +83,8 @@ if (matches.subcommand?.name === 'run') {
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/cli/guest-js/index.ts:66](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/cli/guest-js/index.ts#L66)
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`CliMatches`](/references/javascript/cli/#climatches) \>
+
+**Source**: [index.ts:66](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/cli/guest-js/index.ts#L66)
diff --git a/src/content/docs/references/javascript/clipboard-manager.md b/src/content/docs/references/javascript/clipboard-manager.md
index 70cec892..c4748467 100644
--- a/src/content/docs/references/javascript/clipboard-manager.md
+++ b/src/content/docs/references/javascript/clipboard-manager.md
@@ -9,20 +9,14 @@ Read and write to the system clipboard.
## Functions
-<a id="readtext" name="readtext"></a>
-
### readText()
```ts
-function readText(): Promise<string>;
+readText(): Promise< string >
```
Gets the clipboard content as plain text.
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
-
#### Example
```typescript
@@ -34,20 +28,34 @@ const clipboardText = await readText();
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/clipboard-manager/guest-js/index.ts:51](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/clipboard-manager/guest-js/index.ts#L51)
+#### Returns
----
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \>
-<a id="writetext" name="writetext"></a>
+**Source**: [index.ts:51](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/clipboard-manager/guest-js/index.ts#L51)
+
+---
### writeText()
```ts
-function writeText(text, opts?): Promise<void>;
+writeText(text, opts?): Promise< void >
```
Writes plain text to the clipboard.
+#### Example
+
+```typescript
+import { writeText, readText } from '@tauri-apps/plugin-clipboard-manager';
+await writeText('Tauri is awesome!');
+assert(await readText(), 'Tauri is awesome!');
+```
+
+#### Since
+
+2.0.0
+
#### Parameters
| Parameter | Type |
@@ -58,20 +66,8 @@ Writes plain text to the clipboard.
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
A promise indicating the success or failure of the operation.
-#### Example
-
-```typescript
-import { writeText, readText } from '@tauri-apps/plugin-clipboard-manager';
-await writeText('Tauri is awesome!');
-assert(await readText(), 'Tauri is awesome!');
-```
-
-#### Since
-
-2.0.0
-
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/clipboard-manager/guest-js/index.ts:28](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/clipboard-manager/guest-js/index.ts#L28)
+**Source**: [index.ts:28](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/clipboard-manager/guest-js/index.ts#L28)
diff --git a/src/content/docs/references/javascript/deep-link.md b/src/content/docs/references/javascript/deep-link.md
index b8ea767d..2409833c 100644
--- a/src/content/docs/references/javascript/deep-link.md
+++ b/src/content/docs/references/javascript/deep-link.md
@@ -7,28 +7,24 @@ sidebar:
## Functions
-<a id="getcurrent" name="getcurrent"></a>
-
### getCurrent()
```ts
-function getCurrent(): Promise<string[] | null>;
+getCurrent(): Promise< string[] | null >
```
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`[] \| `null`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string`[] \| `null` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/deep-link/guest-js/index.ts:8](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/deep-link/guest-js/index.ts#L8)
+**Source**: [index.ts:8](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/deep-link/guest-js/index.ts#L8)
---
-<a id="onopenurl" name="onopenurl"></a>
-
### onOpenUrl()
```ts
-function onOpenUrl(handler): Promise<UnlistenFn>;
+onOpenUrl(handler): Promise< UnlistenFn >
```
#### Parameters
@@ -39,6 +35,6 @@ function onOpenUrl(handler): Promise<UnlistenFn>;
#### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`UnlistenFn`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `UnlistenFn` \>
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/deep-link/guest-js/index.ts:14](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/deep-link/guest-js/index.ts#L14)
+**Source**: [index.ts:14](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/deep-link/guest-js/index.ts#L14)
diff --git a/src/content/docs/references/javascript/dialog.md b/src/content/docs/references/javascript/dialog.md
index 66fbcc2f..5614a4d2 100644
--- a/src/content/docs/references/javascript/dialog.md
+++ b/src/content/docs/references/javascript/dialog.md
@@ -7,23 +7,19 @@ sidebar:
## Interfaces
-<a id="confirmdialogoptions" name="confirmdialogoptions"></a>
-
### ConfirmDialogOptions
#### Properties
| Property | Type | Description |
| :--------------------------------------------------------- | :----------------------------------- | :------------------------------------------------- |
-| <a id="cancellabel" name="cancellabel"></a> `cancelLabel?` | `string` | The label of the cancel button. |
-| <a id="oklabel" name="oklabel"></a> `okLabel?` | `string` | The label of the confirm button. |
-| <a id="title" name="title"></a> `title?` | `string` | The title of the dialog. Defaults to the app name. |
-| <a id="type" name="type"></a> `type?` | `"info"` \| `"warning"` \| `"error"` | The type of the dialog. Defaults to `info`. |
+| <a id="cancellabel" name="cancellabel"></a> `cancelLabel`? | `string` | The label of the cancel button. |
+| <a id="oklabel" name="oklabel"></a> `okLabel`? | `string` | The label of the confirm button. |
+| <a id="title" name="title"></a> `title`? | `string` | The title of the dialog. Defaults to the app name. |
+| <a id="type" name="type"></a> `type`? | `"info"` \| `"warning"` \| `"error"` | The type of the dialog. Defaults to `info`. |
---
-<a id="dialogfilter" name="dialogfilter"></a>
-
### DialogFilter
Extension filters for the file dialog.
@@ -34,35 +30,31 @@ Extension filters for the file dialog.
#### Properties
-| Property | Type | Description |
-| :----------------------------------------------------- | :--------- | :------------------------------------------------------------------------------------------------------------- |
-| <a id="extensions" name="extensions"></a> `extensions` | `string`[] | Extensions to filter, without a `.` prefix.<br /><br />**Example**<br />`typescriptextensions: ['svg', 'png']` |
-| <a id="name" name="name"></a> `name` | `string` | Filter name. |
+| Property | Type | Description |
+| :----------------------------------------------------- | :--------- | :--------------------------------------------------------------------------------------------------------------------- |
+| <a id="extensions" name="extensions"></a> `extensions` | `string`[] | Extensions to filter, without a `.` prefix.<br /><br />**Example**<br /><br />`typescript extensions: ['svg', 'png'] ` |
+| <a id="name" name="name"></a> `name` | `string` | Filter name. |
---
-<a id="fileresponse" name="fileresponse"></a>
-
### FileResponse
#### Properties
| Property | Type |
| :------------------------------------------------------ | :------- |
-| <a id="base64data" name="base64data"></a> `base64Data?` | `string` |
-| <a id="duration" name="duration"></a> `duration?` | `number` |
-| <a id="height" name="height"></a> `height?` | `number` |
-| <a id="mimetype" name="mimetype"></a> `mimeType?` | `string` |
-| <a id="modifiedat" name="modifiedat"></a> `modifiedAt?` | `number` |
-| <a id="name-1" name="name-1"></a> `name?` | `string` |
+| <a id="base64data" name="base64data"></a> `base64Data`? | `string` |
+| <a id="duration" name="duration"></a> `duration`? | `number` |
+| <a id="height" name="height"></a> `height`? | `number` |
+| <a id="mimetype" name="mimetype"></a> `mimeType`? | `string` |
+| <a id="modifiedat" name="modifiedat"></a> `modifiedAt`? | `number` |
+| <a id="name" name="name"></a> `name`? | `string` |
| <a id="path" name="path"></a> `path` | `string` |
| <a id="size" name="size"></a> `size` | `number` |
-| <a id="width" name="width"></a> `width?` | `number` |
+| <a id="width" name="width"></a> `width`? | `number` |
---
-<a id="messagedialogoptions" name="messagedialogoptions"></a>
-
### MessageDialogOptions
#### Since
@@ -71,16 +63,14 @@ Extension filters for the file dialog.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------- | :----------------------------------- | :------------------------------------------------- |
-| <a id="oklabel-1" name="oklabel-1"></a> `okLabel?` | `string` | The label of the confirm button. |
-| <a id="title-1" name="title-1"></a> `title?` | `string` | The title of the dialog. Defaults to the app name. |
-| <a id="type-1" name="type-1"></a> `type?` | `"info"` \| `"warning"` \| `"error"` | The type of the dialog. Defaults to `info`. |
+| Property | Type | Description |
+| :--------------------------------------------- | :----------------------------------- | :------------------------------------------------- |
+| <a id="oklabel" name="oklabel"></a> `okLabel`? | `string` | The label of the confirm button. |
+| <a id="title" name="title"></a> `title`? | `string` | The title of the dialog. Defaults to the app name. |
+| <a id="type" name="type"></a> `type`? | `"info"` \| `"warning"` \| `"error"` | The type of the dialog. Defaults to `info`. |
---
-<a id="opendialogoptions" name="opendialogoptions"></a>
-
### OpenDialogOptions
Options for the open dialog.
@@ -91,19 +81,17 @@ Options for the open dialog.
#### Properties
-| Property | Type | Description |
-| :--------------------------------------------------------- | :---------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="defaultpath" name="defaultpath"></a> `defaultPath?` | `string` | Initial directory or file path. |
-| <a id="directory" name="directory"></a> `directory?` | `boolean` | Whether the dialog is a directory selection or not. |
-| <a id="filters" name="filters"></a> `filters?` | [`DialogFilter`](/references/javascript/dialog.md#dialogfilter)[] | The filters of the dialog. |
-| <a id="multiple" name="multiple"></a> `multiple?` | `boolean` | Whether the dialog allows multiple selection or not. |
-| <a id="recursive" name="recursive"></a> `recursive?` | `boolean` | If `directory` is true, indicates that it will be read recursively later.<br />Defines whether subdirectories will be allowed on the scope or not. |
-| <a id="title-2" name="title-2"></a> `title?` | `string` | The title of the dialog window. |
+| Property | Type | Description |
+| :--------------------------------------------------------- | :-------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="defaultpath" name="defaultpath"></a> `defaultPath`? | `string` | Initial directory or file path. |
+| <a id="directory" name="directory"></a> `directory`? | `boolean` | Whether the dialog is a directory selection or not. |
+| <a id="filters" name="filters"></a> `filters`? | [`DialogFilter`](/references/javascript/dialog/#dialogfilter)[] | The filters of the dialog. |
+| <a id="multiple" name="multiple"></a> `multiple`? | `boolean` | Whether the dialog allows multiple selection or not. |
+| <a id="recursive" name="recursive"></a> `recursive`? | `boolean` | If `directory` is true, indicates that it will be read recursively later.<br />Defines whether subdirectories will be allowed on the scope or not. |
+| <a id="title" name="title"></a> `title`? | `string` | The title of the dialog window. |
---
-<a id="savedialogoptions" name="savedialogoptions"></a>
-
### SaveDialogOptions
Options for the save dialog.
@@ -114,55 +102,38 @@ Options for the save dialog.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------------------- | :---------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="defaultpath-1" name="defaultpath-1"></a> `defaultPath?` | `string` | Initial directory or file path.<br />If it's a directory path, the dialog interface will change to that folder.<br />If it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder. |
-| <a id="filters-1" name="filters-1"></a> `filters?` | [`DialogFilter`](/references/javascript/dialog.md#dialogfilter)[] | The filters of the dialog. |
-| <a id="title-3" name="title-3"></a> `title?` | `string` | The title of the dialog window. |
+| Property | Type | Description |
+| :--------------------------------------------------------- | :-------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="defaultpath" name="defaultpath"></a> `defaultPath`? | `string` | Initial directory or file path.<br />If it's a directory path, the dialog interface will change to that folder.<br />If it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder. |
+| <a id="filters" name="filters"></a> `filters`? | [`DialogFilter`](/references/javascript/dialog/#dialogfilter)[] | The filters of the dialog. |
+| <a id="title" name="title"></a> `title`? | `string` | The title of the dialog window. |
## Type Aliases
-<a id="opendialogreturnt" name="opendialogreturnt"></a>
-
-### OpenDialogReturn\<T\>
+### OpenDialogReturn
```ts
-type OpenDialogReturn<T>: T["directory"] extends true ? T["multiple"] extends true ? string[] | null : string | null : T["multiple"] extends true ? FileResponse[] | null : FileResponse | null;
+OpenDialogReturn: <T> T["directory"] extends true ? T["multiple"] extends true ? string[] | null : string | null : T["multiple"] extends true ? FileResponse[] | null : FileResponse | null
```
#### Type parameters
-| Type parameter |
-| :-------------------------------------------------------------------------------------- |
-| `T` _extends_ [`OpenDialogOptions`](/references/javascript/dialog.md#opendialogoptions) |
+| Parameter |
+| :------------------------------------------------------------------------------------ |
+| `T` _extends_ [`OpenDialogOptions`](/references/javascript/dialog/#opendialogoptions) |
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/dialog/guest-js/index.ts:101](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L101)
+**Source**: [index.ts:101](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L101)
## Functions
-<a id="ask" name="ask"></a>
-
### ask()
```ts
-function ask(message, options?): Promise<boolean>;
+ask(message, options?): Promise< boolean >
```
Shows a question dialog with `Yes` and `No` buttons.
-#### Parameters
-
-| Parameter | Type | Description |
-| :--------- | :------------------------------------------------------------------------------------------ | :----------------------------------------------------------------- |
-| `message` | `string` | The message to show. |
-| `options`? | `string` \| [`ConfirmDialogOptions`](/references/javascript/dialog.md#confirmdialogoptions) | The dialog's options. If a string, it represents the dialog title. |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
-
-A promise resolving to a boolean indicating whether `Yes` was clicked or not.
-
#### Example
```typescript
@@ -178,32 +149,30 @@ const yes2 = await ask('This action cannot be reverted. Are you sure?', {
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/dialog/guest-js/index.ts:249](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L249)
+#### Parameters
----
+| Parameter | Type | Description |
+| :--------- | :---------------------------------------------------------------------------------------- | :----------------------------------------------------------------- |
+| `message` | `string` | The message to show. |
+| `options`? | `string` \| [`ConfirmDialogOptions`](/references/javascript/dialog/#confirmdialogoptions) | The dialog's options. If a string, it represents the dialog title. |
-<a id="confirm" name="confirm"></a>
+#### Returns
-### confirm()
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-```ts
-function confirm(message, options?): Promise<boolean>;
-```
-
-Shows a question dialog with `Ok` and `Cancel` buttons.
+A promise resolving to a boolean indicating whether `Yes` was clicked or not.
-#### Parameters
+**Source**: [index.ts:249](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L249)
-| Parameter | Type | Description |
-| :--------- | :------------------------------------------------------------------------------------------ | :----------------------------------------------------------------- |
-| `message` | `string` | The message to show. |
-| `options`? | `string` \| [`ConfirmDialogOptions`](/references/javascript/dialog.md#confirmdialogoptions) | The dialog's options. If a string, it represents the dialog title. |
+---
-#### Returns
+### confirm()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>
+```ts
+confirm(message, options?): Promise< boolean >
+```
-A promise resolving to a boolean indicating whether `Ok` was clicked or not.
+Shows a question dialog with `Ok` and `Cancel` buttons.
#### Example
@@ -212,7 +181,10 @@ import { confirm } from '@tauri-apps/plugin-dialog';
const confirmed = await confirm('Are you sure?', 'Tauri');
const confirmed2 = await confirm(
'This action cannot be reverted. Are you sure?',
- { title: 'Tauri', type: 'warning' }
+ {
+ title: 'Tauri',
+ type: 'warning',
+ }
);
```
@@ -220,32 +192,30 @@ const confirmed2 = await confirm(
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/dialog/guest-js/index.ts:279](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L279)
-
----
+#### Parameters
-<a id="message" name="message"></a>
+| Parameter | Type | Description |
+| :--------- | :---------------------------------------------------------------------------------------- | :----------------------------------------------------------------- |
+| `message` | `string` | The message to show. |
+| `options`? | `string` \| [`ConfirmDialogOptions`](/references/javascript/dialog/#confirmdialogoptions) | The dialog's options. If a string, it represents the dialog title. |
-### message()
+#### Returns
-```ts
-function message(message, options?): Promise<void>;
-```
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `boolean` \>
-Shows a message dialog with an `Ok` button.
+A promise resolving to a boolean indicating whether `Ok` was clicked or not.
-#### Parameters
+**Source**: [index.ts:279](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L279)
-| Parameter | Type | Description |
-| :--------- | :------------------------------------------------------------------------------------------ | :----------------------------------------------------------------- |
-| `message` | `string` | The message to show. |
-| `options`? | `string` \| [`MessageDialogOptions`](/references/javascript/dialog.md#messagedialogoptions) | The dialog's options. If a string, it represents the dialog title. |
+---
-#### Returns
+### message()
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+```ts
+message(message, options?): Promise< void >
+```
-A promise indicating the success or failure of the operation.
+Shows a message dialog with an `Ok` button.
#### Example
@@ -259,16 +229,27 @@ await message('File not found', { title: 'Tauri', type: 'error' });
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/dialog/guest-js/index.ts:220](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L220)
+#### Parameters
+
+| Parameter | Type | Description |
+| :--------- | :---------------------------------------------------------------------------------------- | :----------------------------------------------------------------- |
+| `message` | `string` | The message to show. |
+| `options`? | `string` \| [`MessageDialogOptions`](/references/javascript/dialog/#messagedialogoptions) | The dialog's options. If a string, it represents the dialog title. |
----
+#### Returns
-<a id="open" name="open"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+A promise indicating the success or failure of the operation.
+
+**Source**: [index.ts:220](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L220)
+
+---
### open()
```ts
-function open<T>(options): Promise<OpenDialogReturn<T>>;
+open<T>(options = ...): Promise< OpenDialogReturn< T > >
```
Open a file/directory selection dialog.
@@ -280,25 +261,7 @@ prefer writing a dedicated command instead.
Note that the scope change is not persisted, so the values are cleared when the application is restarted.
You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope).
-#### Type parameters
-
-| Type parameter |
-| :-------------------------------------------------------------------------------------- |
-| `T` _extends_ [`OpenDialogOptions`](/references/javascript/dialog.md#opendialogoptions) |
-
-#### Parameters
-
-| Parameter | Type |
-| :-------- | :--- |
-| `options` | `T` |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OpenDialogReturn`](/references/javascript/dialog.md#opendialogreturnt)\<`T`\>\>
-
-A promise resolving to the selected path(s)
-
-#### Examples
+#### Example
```typescript
import { open } from '@tauri-apps/plugin-dialog';
@@ -321,6 +284,8 @@ if (Array.isArray(selected)) {
}
```
+#### Example
+
```typescript
import { open } from '@tauri-apps/plugin-dialog';
import { appDir } from '@tauri-apps/api/path';
@@ -343,16 +308,32 @@ if (Array.isArray(selected)) {
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/dialog/guest-js/index.ts:161](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L161)
+#### Type parameters
----
+| Parameter |
+| :------------------------------------------------------------------------------------ |
+| `T` _extends_ [`OpenDialogOptions`](/references/javascript/dialog/#opendialogoptions) |
-<a id="save" name="save"></a>
+#### Parameters
+
+| Parameter | Type |
+| :-------- | :--- |
+| `options` | `T` |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`OpenDialogReturn`](/references/javascript/dialog/#opendialogreturn)\< `T` \> \>
+
+A promise resolving to the selected path(s)
+
+**Source**: [index.ts:161](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L161)
+
+---
### save()
```ts
-function save(options): Promise<string | null>;
+save(options = {}): Promise< string | null >
```
Open a file/directory save dialog.
@@ -364,18 +345,6 @@ prefer writing a dedicated command instead.
Note that the scope change is not persisted, so the values are cleared when the application is restarted.
You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope).
-#### Parameters
-
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------ |
-| `options` | [`SaveDialogOptions`](/references/javascript/dialog.md#savedialogoptions) |
-
-#### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string` \| `null`\>
-
-A promise resolving to the selected path.
-
#### Example
```typescript
@@ -394,4 +363,16 @@ const filePath = await save({
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/dialog/guest-js/index.ts:195](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L195)
+#### Parameters
+
+| Parameter | Type |
+| :-------- | :---------------------------------------------------------------------- |
+| `options` | [`SaveDialogOptions`](/references/javascript/dialog/#savedialogoptions) |
+
+#### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `string` \| `null` \>
+
+A promise resolving to the selected path.
+
+**Source**: [index.ts:195](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/dialog/guest-js/index.ts#L195)
diff --git a/src/content/docs/references/javascript/fs.md b/src/content/docs/references/javascript/fs.md
index bb59bbf3..14bd6fdd 100644
--- a/src/content/docs/references/javascript/fs.md
+++ b/src/content/docs/references/javascript/fs.md
@@ -11,7 +11,7 @@ Access the file system.
This module prevents path traversal, not allowing absolute paths or parent dir components
(i.e. "/usr/path/to/file" or "../path/to/file" paths are not allowed).
-Paths accessed with this API must be relative to one of the [base directories](/references/javascript/fs.md#basedirectory)
+Paths accessed with this API must be relative to one of the [base directories](/references/javascript/fs/#basedirectory)
so if you need access to arbitrary filesystem paths, you must write such logic on the core layer instead.
The API has a scope configuration that forces you to restrict the paths that can be accessed using glob patterns.
@@ -63,8 +63,6 @@ Note that this scope applies to **all** APIs on this module.
## Enumerations
-<a id="basedirectory" name="basedirectory"></a>
-
### BaseDirectory
#### Since
@@ -73,17 +71,15 @@ Note that this scope applies to **all** APIs on this module.
#### Enumeration Members
-<a id="appcache" name="appcache"></a>
-
##### AppCache
```ts
AppCache: 16;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:20](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:20](undefined)
-<a id="appconfig" name="appconfig"></a>
+---
##### AppConfig
@@ -91,9 +87,9 @@ AppCache: 16;
AppConfig: 13;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:17](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:17](undefined)
-<a id="appdata" name="appdata"></a>
+---
##### AppData
@@ -101,9 +97,9 @@ AppConfig: 13;
AppData: 14;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:18](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:18](undefined)
-<a id="applocaldata" name="applocaldata"></a>
+---
##### AppLocalData
@@ -111,9 +107,9 @@ AppData: 14;
AppLocalData: 15;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:19](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:19](undefined)
-<a id="applog" name="applog"></a>
+---
##### AppLog
@@ -121,9 +117,9 @@ AppLocalData: 15;
AppLog: 17;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:21](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:21](undefined)
-<a id="audio" name="audio"></a>
+---
##### Audio
@@ -131,9 +127,9 @@ AppLog: 17;
Audio: 1;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:5](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:5](undefined)
-<a id="cache" name="cache"></a>
+---
##### Cache
@@ -141,9 +137,9 @@ Audio: 1;
Cache: 2;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:6](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:6](undefined)
-<a id="config" name="config"></a>
+---
##### Config
@@ -151,9 +147,9 @@ Cache: 2;
Config: 3;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:7](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:7](undefined)
-<a id="data" name="data"></a>
+---
##### Data
@@ -161,9 +157,9 @@ Config: 3;
Data: 4;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:8](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:8](undefined)
-<a id="desktop" name="desktop"></a>
+---
##### Desktop
@@ -171,9 +167,9 @@ Data: 4;
Desktop: 18;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:22](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:22](undefined)
-<a id="document" name="document"></a>
+---
##### Document
@@ -181,9 +177,9 @@ Desktop: 18;
Document: 6;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:10](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:10](undefined)
-<a id="download" name="download"></a>
+---
##### Download
@@ -191,9 +187,9 @@ Document: 6;
Download: 7;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:11](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:11](undefined)
-<a id="executable" name="executable"></a>
+---
##### Executable
@@ -201,9 +197,9 @@ Download: 7;
Executable: 19;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:23](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:23](undefined)
-<a id="font" name="font"></a>
+---
##### Font
@@ -211,9 +207,9 @@ Executable: 19;
Font: 20;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:24](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:24](undefined)
-<a id="home" name="home"></a>
+---
##### Home
@@ -221,9 +217,9 @@ Font: 20;
Home: 21;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:25](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:25](undefined)
-<a id="localdata" name="localdata"></a>
+---
##### LocalData
@@ -231,9 +227,9 @@ Home: 21;
LocalData: 5;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:9](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:9](undefined)
-<a id="picture" name="picture"></a>
+---
##### Picture
@@ -241,9 +237,9 @@ LocalData: 5;
Picture: 8;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:12](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:12](undefined)
-<a id="public" name="public"></a>
+---
##### Public
@@ -251,9 +247,9 @@ Picture: 8;
Public: 9;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:13](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:13](undefined)
-<a id="resource" name="resource"></a>
+---
##### Resource
@@ -261,9 +257,9 @@ Public: 9;
Resource: 11;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:15](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:15](undefined)
-<a id="runtime" name="runtime"></a>
+---
##### Runtime
@@ -271,9 +267,9 @@ Resource: 11;
Runtime: 22;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:26](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:26](undefined)
-<a id="temp" name="temp"></a>
+---
##### Temp
@@ -281,9 +277,9 @@ Runtime: 22;
Temp: 12;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:16](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:16](undefined)
-<a id="template" name="template"></a>
+---
##### Template
@@ -291,9 +287,9 @@ Temp: 12;
Template: 23;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:27](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:27](undefined)
-<a id="video" name="video"></a>
+---
##### Video
@@ -301,27 +297,23 @@ Template: 23;
Video: 10;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:14](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/path.d.ts:14](undefined)
---
-<a id="seekmode" name="seekmode"></a>
-
### SeekMode
#### Enumeration Members
-<a id="current" name="current"></a>
-
##### Current
```ts
Current: 1;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/fs/guest-js/index.ts:69](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L69)
+**Source**: [plugins/fs/guest-js/index.ts:69](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L69)
-<a id="end" name="end"></a>
+---
##### End
@@ -329,9 +321,9 @@ Current: 1;
End: 2;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/fs/guest-js/index.ts:70](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L70)
+**Source**: [plugins/fs/guest-js/index.ts:70](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L70)
-<a id="start" name="start"></a>
+---
##### Start
@@ -339,12 +331,10 @@ End: 2;
Start: 0;
```
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/fs/guest-js/index.ts:68](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L68)
+**Source**: [plugins/fs/guest-js/index.ts:68](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L68)
## Classes
-<a id="filehandle" name="filehandle"></a>
-
### FileHandle
The Tauri abstraction for reading and writing files.
@@ -359,9 +349,7 @@ The Tauri abstraction for reading and writing files.
#### Constructors
-<a id="constructors" name="constructors"></a>
-
-##### new FileHandle()
+##### constructor()
```ts
new FileHandle(rid): FileHandle
@@ -375,44 +363,40 @@ new FileHandle(rid): FileHandle
###### Returns
-[`FileHandle`](/references/javascript/fs.md#filehandle)
+[`FileHandle`](/references/javascript/fs/#filehandle)
###### Overrides
-`Resource.constructor`
+Resource.constructor
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/fs/guest-js/index.ts:252](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L252)
+**Source**: [plugins/fs/guest-js/index.ts:252](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L252)
#### Properties
-| Property | Modifier | Type | Inherited from |
-| :----------------------------------------------- | :-------- | :---- | :------------------ |
-| <a id="#private" name="#private"></a> `#private` | `private` | `any` | `Resource.#private` |
+| Property | Type |
+| :--------------------------------------------------------- | :---- |
+| `private` <a id="#private" name="#private"></a> `#private` | `any` |
#### Accessors
-<a id="rid" name="rid"></a>
-
##### rid
```ts
get rid(): number
```
-###### Returns
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/core.d.ts:123](undefined)
-`number`
+###### Inherited from
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/core.d.ts:123](undefined)
+Resource.rid
#### Methods
-<a id="close" name="close"></a>
-
##### close()
```ts
-close(): Promise<void>
+close(): Promise< void >
```
Destroys and cleans up this resource from memory.
@@ -420,25 +404,25 @@ Destroys and cleans up this resource from memory.
###### Returns
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
###### Inherited from
-`Resource.close`
+Resource.close
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/core.d.ts:129](undefined)
+**Source**: [node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.13/node_modules/@tauri-apps/api/core.d.ts:129](undefined)
-<a id="read" name="read"></a>
+---
##### read()
```ts
-read(buffer): Promise<null | number>
+read(buffer): Promise< null | number >
```
Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
-encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may
+encountered. Even if `read()` resolves to `n` \< `p.byteLength`, it may
use all of `p` as scratch space during the call. If some data is
available but not `p.byteLength` bytes, `read()` conventionally resolves
to what is available instead of waiting for more.
@@ -448,21 +432,11 @@ When `read()` encounters end-of-file condition, it resolves to EOF
When `read()` encounters an error, it rejects with an error.
-Callers should always process the `n` > `0` bytes returned before
+Callers should always process the `n` \> `0` bytes returned before
considering the EOF (`null`). Doing so correctly handles I/O errors that
happen after reading some bytes and also both of the allowed EOF
behaviors.
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------- |
-| `buffer` | [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| `number`\>
-
###### Example
```typescript
@@ -479,14 +453,24 @@ await close(file.rid);
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/fs/guest-js/index.ts:287](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L287)
+###### Parameters
+
+| Parameter | Type |
+| :-------- | :---------------------------------------------------------------------------------------------------- |
+| `buffer` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
+
+###### Returns
-<a id="seek" name="seek"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `null` \| `number` \>
+
+**Source**: [plugins/fs/guest-js/index.ts:287](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L287)
+
+---
##### seek()
```ts
-seek(offset, whence): Promise<number>
+seek(offset, whence): Promise< number >
```
Seek sets the offset for the next `read()` or `write()` to offset,
@@ -500,17 +484,6 @@ any positive offset is legal, but the behavior of subsequent I/O
operations on the underlying object is implementation-dependent.
It returns the number of cursor position.
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :-------------------------------------------------- |
-| `offset` | `number` |
-| `whence` | [`SeekMode`](/references/javascript/fs.md#seekmode) |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`number`\>
-
###### Example
```typescript
@@ -546,21 +519,28 @@ console.log(await file.seek(-2, SeekMode.End)); // "9" (e.g. 11-2)
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/fs/guest-js/index.ts:332](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L332)
+###### Parameters
+
+| Parameter | Type |
+| :-------- | :------------------------------------------------ |
+| `offset` | `number` |
+| `whence` | [`SeekMode`](/references/javascript/fs/#seekmode) |
-<a id="stat" name="stat"></a>
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `number` \>
+
+**Source**: [plugins/fs/guest-js/index.ts:332](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L332)
+
+---
##### stat()
```ts
-stat(): Promise<FileInfo>
+stat(): Promise< FileInfo >
```
-Returns a [`FileInfo`](/references/javascript/fs.md#fileinfo) for this file.
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`FileInfo`](/references/javascript/fs.md#fileinfo)\>
+Returns a [`FileInfo`](/references/javascript/fs/#fileinfo) for this file.
###### Example
@@ -575,29 +555,23 @@ console.log(fileInfo.isFile); // true
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/fs/guest-js/index.ts:353](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L353)
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< [`FileInfo`](/references/javascript/fs/#fileinfo) \>
+
+**Source**: [plugins/fs/guest-js/index.ts:353](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L353)
-<a id="truncate" name="truncate"></a>
+---
##### truncate()
```ts
-truncate(len?): Promise<void>
+truncate(len?): Promise< void >
```
Truncates or extends this file, to reach the specified `len`.
If `len` is not specified then the entire file contents are truncated.
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :------- |
-| `len`? | `number` |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
-
###### Example
```typescript
@@ -636,14 +610,24 @@ console.log(new TextDecoder().decode(data)); // Hello W
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/fs/guest-js/index.ts:384](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L384)
+###### Parameters
+
+| Parameter | Type |
+| :-------- | :------- |
+| `len`? | `number` |
+
+###### Returns
-<a id="write" name="write"></a>
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `void` \>
+
+**Source**: [plugins/fs/guest-js/index.ts:384](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L384)
+
+---
##### write()
```ts
-write(data): Promise<number>
+write(data): Promise< number >
```
Writes `p.byteLength` bytes from `p` to the underlying data stream. It
@@ -653,16 +637,6 @@ write to stop early. `write()` must reject with a non-null error if
would resolve to `n` < `p.byteLength`. `write()` must not modify the
slice data, even temporarily.
-###### Parameters
-
-| Parameter | Type |
-| :-------- | :------------------------------------------------------------------------------------------------------- |
-| `data` | [`Uint8Array ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
-
-###### Returns
-
-[`Promise ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`number`\>
-
###### Example
```typescript
@@ -678,11 +652,19 @@ await close(file.rid);
2.0.0
-**Source**: [../../Users/lorenzolewis/Developer/tauri-docs-1/packages/plugins-workspace/plugins/fs/guest-js/index.ts:411](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L411)
+###### Parameters
-## Interfaces
+| Parameter | Type |
+| :-------- | :---------------------------------------------------------------------------------------------------- |
+| `data` | [`Uint8Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) |
-<a id="copyfileoptions" name="copyfileoptions"></a>
+###### Returns
+
+[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\< `number` \>
+
+**Source**: [plugins/fs/guest-js/index.ts:411](https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/fs/guest-js/index.ts#L411)
+
+## Interfaces
### CopyFileOptions
@@ -692,15 +674,13 @@ await close(file.rid);
#### Properties
-| Property | Type | Description |
-| :--------------------------------------------------------------------- | :------------------------------------------------------------ | :----------------------------- |
-| <a id="frompathbasedir" name="frompathbasedir"></a> `fromPathBaseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `fromPath`. |
-| <a id="topathbasedir" name="topathbasedir"></a> `toPathBaseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `toPath`. |
+| Property | Type | Description |
+| :--------------------------------------------------------------------- | :---------------------------------------------------------- | :----------------------------- |
+| <a id="frompathbasedir" name="frompathbasedir"></a> `fromPathBaseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `fromPath`. |
+| <a id="topathbasedir" name="topathbasedir"></a> `toPathBaseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `toPath`. |
---
-<a id="createoptions" name="createoptions"></a>
-
### CreateOptions
#### Since
@@ -709,14 +689,12 @@ await close(file.rid);
#### Properties
-| Property | Type | Description |
-| :--------------------------------------------- | :------------------------------------------------------------ | :------------------------ |
-| <a id="basedir" name="basedir"></a> `baseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `path` |
+| Property | Type | Description |
+| :--------------------------------------------- | :---------------------------------------------------------- | :------------------------ |
+| <a id="basedir" name="basedir"></a> `baseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `path` |
---
-<a id="debouncedwatchoptions" name="debouncedwatchoptions"></a>
-
### DebouncedWatchOptions
#### Since
@@ -725,25 +703,23 @@ await close(file.rid);
#### Extends
-- [`WatchOptions`](/references/javascript/fs.md#watchoptions)
+- [`WatchOptions`](/references/javascript/fs/#watchoptions)
#### Properties
-| Property | Type | Description | Inherited from |
-| :--------------------------------------------------- | :------------------------------------------------------------ | :---------------------------- | :------------------------------------------------------------------------------------------------------------------ |
-| <a id="basedir-1" name="basedir-1"></a> `baseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `path` | [`WatchOptions`](/references/javascript/fs.md#watchoptions).[`baseDir`](/references/javascript/fs.md#basedir-10) |
-| <a id="delayms" name="delayms"></a> `delayMs?` | `number` | Debounce delay | - |
-| <a id="recursive" name="recursive"></a> `recursive?` | `boolean` | Watch a directory recursively | [`WatchOptions`](/references/javascript/fs.md#watchoptions).[`recursive`](/references/javascript/fs.md#recursive-3) |
+| Property | Type | Description |
+| :--------------------------------------------------- | :---------------------------------------------------------- | :---------------------------- |
+| <a id="basedir" name="basedir"></a> `baseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `path` |
+| <a id="delayms" name="delayms"></a> `delayMs`? | `number` | Debounce delay |
+| <a id="recursive" name="recursive"></a> `recursive`? | `boolean` | Watch a directory recursively |
---
-<a id="direntry" name="direntry"></a>
-
### DirEntry
A disk entry which is either a file, a directory or a symlink.
-This is the result of the [`readDir`](/references/javascript/fs.md#readdir).
+This is the result of the [`readDir`](/references/javascript/fs/#readdir).
#### Since
@@ -760,8 +736,6 @@ This is the result of the [`readDir`](/references/javascript/fs.md#readdir).
---
-<a id="existsoptions" name="existsoptions"></a>
-
### ExistsOptions
#### Since
@@ -770,14 +744,12 @@ This is the result of the [`readDir`](/references/javascript/fs.md#readdir).
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------- | :------------------------------------------------------------ | :------------------------- |
-| <a id="basedir-2" name="basedir-2"></a> `baseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `path`. |
+| Property | Type | Description |
+| :--------------------------------------------- | :---------------------------------------------------------- | :------------------------- |
+| <a id="basedir" name="basedir"></a> `baseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `path`. |
---
-<a id="fileinfo" name="fileinfo"></a>
-
### FileInfo
A FileInfo describes a file and is returned by `stat`, `lstat` or `fstat`.
@@ -788,30 +760,28 @@ A FileInfo describes a file and is returned by `stat`, `lstat` or `fstat`.
#### Properties
-| Property | Type | Description |
-| :----------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| <a id="atime" name="atime"></a> `atime` | `null` \| [`Date ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | The last access time of the file. This corresponds to the `atime`<br />field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not<br />be available on all platforms. |
-| <a id="birthtime" name="birthtime"></a> `birthtime` | `null` \| [`Date ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | The creation time of the file. This corresponds to the `birthtime`<br />field from `stat` on Mac/BSD and `ftCreationTime` on Windows. This may<br />not be available on all platforms. |
-| <a id="blksize" name="blksize"></a> `blksize` | `null` \| `number` | Blocksize for filesystem I/O.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-| <a id="blocks" name="blocks"></a> `blocks` | `null` \| `number` | Number of blocks allocated to the file, in 512-byte units.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-| <a id="dev" name="dev"></a> `dev` | `null` \| `number` | ID of the device containing the file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-| <a id="fileattributes" name="fileattributes"></a> `fileAttributes` | `null` \| `number` | This field contains the file system attribute information for a file<br />or directory. For possible values and their descriptions, see<br />[File Attribute Constants](https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants) in the Windows Dev Center<br /><br />#### Platform-specific<br /><br />- **macOS / Linux / Android / iOS:** Unsupported. |
-| <a id="gid" name="gid"></a> `gid` | `null` \| `number` | Group ID of the owner of this file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-| <a id="ino" name="ino"></a> `ino` | `null` \| `number` | Inode number.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-| <a id="isdirectory-1" name="isdirectory-1"></a> `isDirectory` | `boolean` | True if this is info for a regular directory. Mutually exclusive to<br />`FileInfo.isFile` and `FileInfo.isSymlink`. |
-| <a id="isfile-1" name="isfile-1"></a> `isFile` | `boolean` | True if this is info for a regular file. Mutually exclusive to<br />`FileInfo.isDirectory` and `FileInfo.isSymlink`. |
-| <a id="issymlink-1" name="issymlink-1"></a> `isSymlink` | `boolean` | True if this is info for a symlink. Mutually exclusive to<br />`FileInfo.isFile` and `FileInfo.isDirectory`. |
-| <a id="mode" name="mode"></a> `mode` | `null` \| `number` | The underlying raw `st_mode` bits that contain the standard Unix<br />permissions for this file/directory.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-| <a id="mtime" name="mtime"></a> `mtime` | `null` \| [`Date ↗️`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | The last modification time of the file. This corresponds to the `mtime`<br />field from `stat` on Linux/Mac OS and `ftLastWriteTime` on Windows. This<br />may not be available on all platforms. |
-| <a id="nlink" name="nlink"></a> `nlink` | `null` \| `number` | Number of hard links pointing to this file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-| <a id="rdev" name="rdev"></a> `rdev` | `null` \| `number` | Device ID of this file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-| <a id="readonly" name="readonly"></a> `readonly` | `boolean` | Whether this is a readonly (unwritable) file. |
-| <a id="size" name="size"></a> `size` | `number` | The size of the file, in bytes. |
-| <a id="uid" name="uid"></a> `uid` | `null` \| `number` | User ID of the owner of this file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
-
----
-
-<a id="mkdiroptions" name="mkdiroptions"></a>
+| Property | Type | Description |
+| :----------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| <a id="atime" name="atime"></a> `atime` | `null` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | The last access time of the file. This corresponds to the `atime`<br />field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not<br />be available on all platforms. |
+| <a id="birthtime" name="birthtime"></a> `birthtime` | `null` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | The creation time of the file. This corresponds to the `birthtime`<br />field from `stat` on Mac/BSD and `ftCreationTime` on Windows. This may<br />not be available on all platforms. |
+| <a id="blksize" name="blksize"></a> `blksize` | `null` \| `number` | Blocksize for filesystem I/O.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+| <a id="blocks" name="blocks"></a> `blocks` | `null` \| `number` | Number of blocks allocated to the file, in 512-byte units.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+| <a id="dev" name="dev"></a> `dev` | `null` \| `number` | ID of the device containing the file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+| <a id="fileattributes" name="fileattributes"></a> `fileAttributes` | `null` \| `number` | This field contains the file system attribute information for a file<br />or directory. For possible values and their descriptions, see<br />[File Attribute Constants](https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants) in the Windows Dev Center<br /><br />#### Platform-specific<br /><br />- **macOS / Linux / Android / iOS:** Unsupported. |
+| <a id="gid" name="gid"></a> `gid` | `null` \| `number` | Group ID of the owner of this file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+| <a id="ino" name="ino"></a> `ino` | `null` \| `number` | Inode number.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+| <a id="isdirectory" name="isdirectory"></a> `isDirectory` | `boolean` | True if this is info for a regular directory. Mutually exclusive to<br />`FileInfo.isFile` and `FileInfo.isSymlink`. |
+| <a id="isfile" name="isfile"></a> `isFile` | `boolean` | True if this is info for a regular file. Mutually exclusive to<br />`FileInfo.isDirectory` and `FileInfo.isSymlink`. |
+| <a id="issymlink" name="issymlink"></a> `isSymlink` | `boolean` | True if this is info for a symlink. Mutually exclusive to<br />`FileInfo.isFile` and `FileInfo.isDirectory`. |
+| <a id="mode" name="mode"></a> `mode` | `null` \| `number` | The underlying raw `st_mode` bits that contain the standard Unix<br />permissions for this file/directory.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+| <a id="mtime" name="mtime"></a> `mtime` | `null` \| [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) | The last modification time of the file. This corresponds to the `mtime`<br />field from `stat` on Linux/Mac OS and `ftLastWriteTime` on Windows. This<br />may not be available on all platforms. |
+| <a id="nlink" name="nlink"></a> `nlink` | `null` \| `number` | Number of hard links pointing to this file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+| <a id="rdev" name="rdev"></a> `rdev` | `null` \| `number` | Device ID of this file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+| <a id="readonly" name="readonly"></a> `readonly` | `boolean` | Whether this is a readonly (unwritable) file. |
+| <a id="size" name="size"></a> `size` | `number` | The size of the file, in bytes. |
+| <a id="uid" name="uid"></a> `uid` | `null` \| `number` | User ID of the owner of this file.<br /><br />#### Platform-specific<br /><br />- **Windows:** Unsupported. |
+
+---
### MkdirOptions
@@ -821,16 +791,14 @@ A FileInfo describes a file and is returned by `stat`, `lstat` or `fstat`.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------------- | :------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------ |
-| <a id="basedir-3" name="basedir-3"></a> `baseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `path` |
-| <a id="mode-1" name="mode-1"></a> `mode?` | `number` | Permissions to use when creating the directory (defaults to `0o777`, before the process's umask). Ignored on Windows. |
-| <a id="recursive-1" name="recursive-1"></a> `recursive?` | `boolean` | Defaults to `false`. If set to `true`, means that any intermediate directories will also be created (as with the shell command `mkdir -p`). |
+| Property | Type | Description |
+| :--------------------------------------------------- | :---------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ |
+| <a id="basedir" name="basedir"></a> `baseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `path` |
+| <a id="mode" name="mode"></a> `mode`? | `number` | Permissions to use when creating the directory (defaults to `0o777`, before the process's umask). Ignored on Windows. |
+| <a id="recursive" name="recursive"></a> `recursive`? | `boolean` | Defaults to `false`. If set to `true`, means that any intermediate directories will also be created (as with the shell command `mkdir -p`). |
---
-<a id="openoptions" name="openoptions"></a>
-
### OpenOptions
#### Since
@@ -839,21 +807,19 @@ A FileInfo describes a file and is returned by `stat`, `lstat` or `fstat`.
#### Properties
-| Property | Type | Description |
-| :---------------------------------------------------- | :------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| <a id="append" name="append"></a> `append?` | `boolean` | Sets the option for the append mode. This option, when `true`, means that<br />writes will append to a file instead of overwriting previous contents.<br />Note that setting `{ write: true, append: true }` has the same effect as<br />setting only `{ append: true }`. |
-| <a id="basedir-4" name="basedir-4"></a> `baseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `path` |
-| <a id="create" name="create"></a> `create?` | `boolean` | Sets the option to allow creating a new file, if one doesn't already<br />exist at the specified path. Requires write or append access to be<br />used. |
-| <a id="createnew" name="createnew"></a> `createNew?` | `boolean` | Defaults to `false`. If set to `true`, no file, directory, or symlink is<br />allowed to exist at the target location. Requires write or append<br />access to be used. When createNew is set to `true`, create and truncate<br />are ignored. |
-| <a id="mode-2" name="mode-2"></a> `mode?` | `number` | Permissions to use if creating the file (defaults to `0o666`, before<br />the process's umask).<br />Ignored on Windows. |
-| <a id="read-1" name="read-1"></a> `read?` | `boolean` | Sets the option for read access. This option, when `true`, means that the<br />file should be read-able if opened. |
-| <a id="truncate-1" name="truncate-1"></a> `truncate?` | `boolean` | Sets the option for truncating a previous file. If a file is<br />successfully opened with this option set it will truncate the file to `0`<br />size if it already exists. The file must be opened with write access<br />for truncate to work. |
-| <a id="write-1" name="write-1"></a> `write?` | `boolean` | Sets the option for write access. This option, when `true`, means that<br />the file should be write-able if opened. If the file already exists,<br />any write calls on it will overwrite its contents, by default without<br />truncating it. |
+| Property | Type | Description |
+| :--------------------------------------------------- | :---------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| <a id="append" name="append"></a> `append`? | `boolean` | Sets the option for the append mode. This option, when `true`, means that<br />writes will append to a file instead of overwriting previous contents.<br />Note that setting `{ write: true, append: true }` has the same effect as<br />setting only `{ append: true }`. |
+| <a id="basedir" name="basedir"></a> `baseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `path` |
+| <a id="create" name="create"></a> `create`? | `boolean` | Sets the option to allow creating a new file, if one doesn't already<br />exist at the specified path. Requires write or append access to be<br />used. |
+| <a id="createnew" name="createnew"></a> `createNew`? | `boolean` | Defaults to `false`. If set to `true`, no file, directory, or symlink is<br />allowed to exist at the target location. Requires write or append<br />access to be used. When createNew is set to `true`, create and truncate<br />are ignored. |
+| <a id="mode" name="mode"></a> `mode`? | `number` | Permissions to use if creating the file (defaults to `0o666`, before<br />the process's umask).<br />Ignored on Windows. |
+| <a id="read" name="read"></a> `read`? | `boolean` | Sets the option for read access. This option, when `true`, means that the<br />file should be read-able if opened. |
+| <a id="truncate" name="truncate"></a> `truncate`? | `boolean` | Sets the option for truncating a previous file. If a file is<br />successfully opened with this option set it will truncate the file to `0`<br />size if it already exists. The file must be opened with write access<br />for truncate to work. |
+| <a id="write" name="write"></a> `write`? | `boolean` | Sets the option for write access. This option, when `true`, means that<br />the file should be write-able if opened. If the file already exists,<br />any write calls on it will overwrite its contents, by default without<br />truncating it. |
---
-<a id="readdiroptions" name="readdiroptions"></a>
-
### ReadDirOptions
#### Since
@@ -862,14 +828,12 @@ A FileInfo describes a file and is returned by `stat`, `lstat` or `fstat`.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------- | :------------------------------------------------------------ | :------------------------ |
-| <a id="basedir-5" name="basedir-5"></a> `baseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `path` |
+| Property | Type | Description |
+| :--------------------------------------------- | :---------------------------------------------------------- | :------------------------ |
+| <a id="basedir" name="basedir"></a> `baseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `path` |
---
-<a id="readfileoptions" name="readfileoptions"></a>
-
### ReadFileOptions
#### Since
@@ -878,14 +842,12 @@ A FileInfo describes a file and is returned by `stat`, `lstat` or `fstat`.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------- | :------------------------------------------------------------ | :------------------------ |
-| <a id="basedir-6" name="basedir-6"></a> `baseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `path` |
+| Property | Type | Description |
+| :--------------------------------------------- | :---------------------------------------------------------- | :------------------------ |
+| <a id="basedir" name="basedir"></a> `baseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `path` |
---
-<a id="removeoptions" name="removeoptions"></a>
-
### RemoveOptions
#### Since
@@ -894,15 +856,13 @@ A FileInfo describes a file and is returned by `stat`, `lstat` or `fstat`.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------------- | :------------------------------------------------------------ | :---------------------------------------------------------------------------------------------- |
-| <a id="basedir-7" name="basedir-7"></a> `baseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `path` |
-| <a id="recursive-2" name="recursive-2"></a> `recursive?` | `boolean` | Defaults to `false`. If set to `true`, path will be removed even if it's a non-empty directory. |
+| Property | Type | Description |
+| :--------------------------------------------------- | :---------------------------------------------------------- | :---------------------------------------------------------------------------------------------- |
+| <a id="basedir" name="basedir"></a> `baseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `path` |
+| <a id="recursive" name="recursive"></a> `recursive`? | `boolean` | Defaults to `false`. If set to `true`, path will be removed even if it's a non-empty directory. |
---
-<a id="renameoptions" name="renameoptions"></a>
-
### RenameOptions
#### Since
@@ -911,15 +871,13 @@ A FileInfo describes a file and is returned by `stat`, `lstat` or `fstat`.
#### Properties
-| Property | Type | Description |
-| :------------------------------------------------------------------ | :------------------------------------------------------------ | :---------------------------- |
-| <a id="newpathbasedir" name="newpathbasedir"></a> `newPathBaseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `newPath`. |
-| <a id="oldpathbasedir" name="oldpathbasedir"></a> `oldPathBaseDir?` | [`BaseDirectory`](/references/javascript/fs.md#basedirectory) | Base directory for `oldPath`. |
+| Property | Type | Description |
+| :------------------------------------------------------------------ | :---------------------------------------------------------- | :---------------------------- |
+| <a id="newpathbasedir" name="newpathbasedir"></a> `newPathBaseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `newPath`. |
+| <a id="oldpathbasedir" name="oldpathbasedir"></a> `oldPathBaseDir`? | [`BaseDirectory`](/references/javascript/fs/#basedirectory) | Base directory for `oldPath`. |
---
-<a id="statoptions" name="statoptions"></a>
-
### StatOptions
#### Since
@@ -928,14 +886,12 @@ A FileInfo describes a file and is returned by `stat`, `lstat` or `fstat`.
#### Properties
-| Property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment