(Vegvisir 3)

vegvisir.Navigation.EVENTS

Various navigation CustomEvents that can be listened for.

Description

All events will also fire on document as a catch-all interface.

Values

navstarted

This CustomEvent will be fired on the navigation target and document when a navigation is started with .navigate().

navfinished

This CustomEvent will be fired on the navigation target and document when a navigation with .navigate() has finished completely.

A navigation is considered finished when the page has been fully loaded and all element attributes have been updated.

CustomEvent.detail property

Accessing the .detail property on a captured Vegvisir event will contain the following object.

Values

target

The target element that is used/was used for the navigation.

Examples

Basic usage

This example logs the target element of all navigations on this page.