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

Tiny relative links solution #177

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

developit
Copy link
Member

@developit developit commented Apr 18, 2017

Just an alternative thought for #138. This only handles the case of relative links in an HTML document - it doesn't account for route('./foo'). Perhaps they are worth treating separately given the different in implementation complexity. This PR actually drops the lib size by a few bytes.

…s for links in a document (not `route("./foo")`). See #138.
@developit
Copy link
Member Author

I believe this needs to steal from the other relative links PR to enable route('./foo')

Copy link

@ricardobrandao ricardobrandao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. The behaviour was only changed in this line to take the current search and hash into account. Anything else is optimizations/inlining.

@FallingSnow
Copy link

Does Preact currently support relative URLs? If not, is there a suggested solution to adding query parameters to a current history entry?

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

4 participants