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

updatePageLinks can't reach shadow DOM #303

Open
Javarome opened this issue Sep 22, 2021 · 1 comment
Open

updatePageLinks can't reach shadow DOM #303

Javarome opened this issue Sep 22, 2021 · 1 comment

Comments

@Javarome
Copy link

Javarome commented Sep 22, 2021

When using web components that include links in their shadow DOM, document.querySelectorAll() won't find navigo links selectors.

A workaround could be to allow the updatePageLinks API to take root elements to look from:

updatePageLinks(roots = [document]) {
  findLinks(roots)
  // etc. 
}

That way, we could allow shadow roots to be updated by providing them as roots to update.

@sugacube
Copy link

I just hit this same issue.

The workaround I found is to have <a> element (or any link) in the shadow dom explicitly call <a @click= router.navigate()>
I may like this even better than having to call updatePageLinks() explicitly whenever dom is updated.

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