@dashkite/navigate

0.3.2 • Public • Published

Navigate

Transforms browser navigation events into an async iterable.

Install

npm i @dashkite/navigate

Bundle with your favorite bundler.

Usage

Install for document:

import {navigate} from "@dashkite/navigate"

do ->
  for await event from navigate document
    console.log "Navigated to #{window.location.href}"

Or use within any Web Components that will need to handle navigation events. Just pass the document fragment to navigate.

API

navigate root

Adds an event listener for link click events and determines whether they need to be routed internally or bubbled up to the browser. Produces events for each internal navigation.

Readme

Keywords

none

Package Sidebar

Install

npm i @dashkite/navigate

Weekly Downloads

0

Version

0.3.2

License

SEE LICENSE IN LICENSE.md

Unpacked Size

8.52 kB

Total Files

4

Last publish

Collaborators

  • dyoder
  • freeformflow