WebViewNavigation
The page's state, on every load and navigation event.
Utilização
Follow navigation inside embedded content.
// Follow navigation inside embedded content.
import { Text, WebView, signal, type WebViewNavigation } from 'kuito';
const state = signal<WebViewNavigation | null>(null);
// Every load and navigation event carries the page's state.
const follow = (event: WebViewNavigation) => (state.value = event);
<>
<Text>{state.value?.loading ? 'Loading…' : state.value?.title}</Text>
<WebView src="https://example.com" flex={1} onLoad={follow} onNavigate={follow} />
</>;Declaração do tipo
export type WebViewNavigation = {
url: string;
title: string;
loading: boolean;
canGoBack: boolean;
canGoForward: boolean;
};Membros 5
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
url | string | Sim | — |
title | string | Sim | — |
loading | boolean | Sim | — |
canGoBack | boolean | Sim | — |
canGoForward | boolean | Sim | — |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.