/
githubmirror
/
tauri
Обзор
Документация
Войти
/
githubmirror
/
tauri
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/api/src/index.ts
52 строки
1 KB
Kornel
docs: document vanilla JS import alternative (#11632)
11 ноя 2024, 15:21
Не верифицирован
11 ноя 2024, 15:21
0fcef3f
Код
Авторство
О чём код?
// Copyright 2019-2024 Tauri Programme within The Commons Conservancy // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT /** * The Tauri API allows you to interface with the backend layer. * * This module exposes all other modules as an object where the key is the module name, and the value is the module exports. * @example * ```typescript * import { event, window, path } from '@tauri-apps/api' * ``` * * ### Vanilla JS API * * The above import syntax is for JavaScript/TypeScript with a bundler. If you're using vanilla JavaScript, you can use the global `window.__TAURI__` object instead. It requires `app.withGlobalTauri` configuration option enabled. * * @example * ```js * const { event, window: tauriWindow, path } = window.__TAURI__; * ``` * * @module */ import * as app from './app' import * as core from './core' import * as dpi from './dpi' import * as event from './event' import * as image from './image' import * as menu from './menu' import * as mocks from './mocks' import * as path from './path' import * as tray from './tray' import * as webview from './webview' import * as webviewWindow from './webviewWindow' import * as window from './window' export { app, core, dpi, event, image, menu, mocks, path, tray, webview, webviewWindow, window }