Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add onNavigate function to register event handlers #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tkers
Copy link
Collaborator

@tkers tkers commented Dec 3, 2018

This adds an onNavigate function to the included script, enabling themes to add new functionality a bit more easily. I currently could not find a nice way to achieve running a function when navigating to another slide, other than monkey patching window.history.replaceState which is pretty ugly (events like window.onpopstate are not triggered when pushing/replacing a new state).

Granted, this is not the cleanest solution either, so definitely open for alternatives or suggestions.

@jdan
Copy link
Owner

jdan commented Dec 4, 2018

Hey @tkers, thanks for the PRs! I went ahead and gave you commit access to this repo so feel free to merge these yourself :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants