Toggles a navigation handler that automatically intercepts only <a> with css selector
croban opened this issue · 6 comments
Could be possible to have additional navigation handler toggle that fires only if tag is below an css selector?
E.g. .app-wiget a...
Do I understand correctly that you need to implement the ability to pass an array (maybe an object?) with selectors to handleHavigation
, within which the handler should work?
Something like:
createRouteStore({
handleNagivation: [
'.foo',
'#bar',
'form'
]
})
Correct, basically I am using svelte app as an widget inside other websites. Widget container self is under well-known node (by id and by css class) and i would like that link handler intercept only clicks from links below that node.
Could you check please v1.0.25? Parent elements now can be specified in handleNavigation
as a comma separated CSS selector string, e.g. '.foo, #bar, form.abc'.
Thx, ...d.ts missing boolean | string
I have add @ts-ignore so that I can continue:
export const route = createRouteStore({
queryClean: true,
fragmentClean: true,
// @ts-ignore
handleNavigation: "#app"
})
more feedback follows
Oops, my bad. Fixed in v1.0.26.
it works for me, thx ;)