Skip to content

Intercept link clicks module #24

@wesleytodd

Description

@wesleytodd

https://github.com/wesleytodd/intercept-link-clicks

@nateps I figured I could knock this one out really quick. I pulled out what was in Nighthawk verbatim, then went through and added most of the stuff from here: https://github.com/derbyjs/tracks/blob/master/lib/History.js#L145

The only things I didn't add was your check for data-router-ignore and my check for the base path. I figured that our independent work can just add these kind of features after the main checks. I did that here in Nighthawk: https://github.com/wesleytodd/nighthawk/blob/intercept-clicks/lib/router.js#L135

What do you think? I tried to keep is simple, the main interface is the single function. I also moved over the unit tests from Nighthawk that covered that section. But it would probably need a bit more test coverage...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions