Skip to content
forked from lukeed/navaid

Fork of Navaid with shadow dom support

License

Notifications You must be signed in to change notification settings

zerodevx/navaid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

navaid

Fork of Navaid with shadow dom support

Navaid is a tiny client-side router. It doesn't support shadow dom anchor links. Now it does.

What changed?

Just one line.

Before:

var x = e.target.closest('a'), y = x && x.getAttribute('href');

After:

var x = e.composedPath, x = e.path || x && x() || [e.target], x = x[0].closest('a'), y = x && x.getAttribute('href');
Package Version Size
Original v1.2.0 909 bytes
Forked v1.2.0-fork.3 934 bytes

Demo: https://zerodevx.github.io/navaid/

Install with NPM

$ npm i -D @zerodevx/navaid

Or from CDN

<head>
  <script src="https://cdn.jsdelivr.net/npm/@zerodevx/navaid@latest"></script>
  ...
</head>

For usage docs, please refer to the original project.

About

Fork of Navaid with shadow dom support

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%