diff --git a/website/versioned_docs/version-v2.7.0/reference/runtime/intro.mdx b/website/versioned_docs/version-v2.7.0/reference/runtime/intro.mdx index 3c491ecf046..eb117e971dc 100644 --- a/website/versioned_docs/version-v2.7.0/reference/runtime/intro.mdx +++ b/website/versioned_docs/version-v2.7.0/reference/runtime/intro.mdx @@ -34,6 +34,13 @@ The JavaScript library is available to the frontend via the `window.runtime` map mode that provides TypeScript declarations for the runtime. This should be located in the `wailsjs` directory in your frontend directory. +e.g. if you wanted to import the [EventsOn](./events/#eventson) function in a Svelte app, you can do the following: + +```ts +// src/App.svelte (for example) +import { EventsOn } from '../wailsjs/runtime' +``` + ### Hide Go: `Hide(ctx context.Context)`