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 support for links in slide navigation #31

Open
jamesnw opened this issue Feb 13, 2024 · 0 comments
Open

Add support for links in slide navigation #31

jamesnw opened this issue Feb 13, 2024 · 0 comments
Assignees

Comments

@jamesnw
Copy link
Contributor

jamesnw commented Feb 13, 2024

Is your feature request related to a problem? Please describe.
Currently, to-slide attributes and the to-slide-named attributes proposed in #30 only work for button elements. This could be expanded to work for links as well.

Describe the solution you'd like
As proposed in #29, a user would add the element <a href="#" to-slide="14">To 14</a>. The Web component would then replace the href with the hash link to the slide.

It won't work until the web component is inited, but that's fine because the target id doesn't exist until it's inited anyways.

Describe alternatives you've considered
We could require the user to generate the URL in advance. However, the hash pattern is lengthy, and includes the id namespace, and is not easily guessable.
We could add a method for generating the URL from outside the component, but then we are requiring the user to manipulate the DOM after the web component has been inited.

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

No branches or pull requests

2 participants