Skip to content

wabain/link-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a utility library which simplifies handling click events for multiple links. It aims to provide simple and correct helpers which work with the DOM and with generic URL syntax.

Usage

Using CommonJS:

var LinkWatcher = require('link-watcher');

LinkWatcher.onLinkClicked(/* ... */);

As a browser global:

<script src="link-watcher.min.js"></script>

<script>
  LinkWatcher.onLinkClicked(/* ... */);
</script>

API

onLinkClicked(rootElement, callback, options)
getNavigationInfo(event, rootInfo)
urlResolve(url)

TODO

  • documentation
  • work out whether IRIs are supported
  • work with SVG links
  • work with form submission?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published