So ... I think I have to recommend against using #Lit to build whole websites, because it doesn't seem to support fragment links (https://example/#this-is-the-fragment) well or at all. It's great at building discrete elements without user-addressable parts, but that's not enough for rendering the top level of a whole page.

Tell me I'm wrong at github.com/lit/lit/discussions.

#WebComponents #CustomElements

@jyasskin well that seems like a crazy shortcoming. Shocked that doesn't seem to have come up before and been addressed. I guess there's not a convenient way to have the fragment break out of the shadowDom or be exposed somehow?

@mcneely It could be that people writing client-side renderers have already given up on fragments. But I was also surprised not to find any bugs about it.

@jyasskin @mcneely We can talk further in the Lit discussion you started, but this really has nothing to do with Lit per se, it’s just a limitation of Shadow DOM that has been known for years and not (yet?) risen to a high enough priority to get addressed.

@graynorton @jyasskin make sense. I was thinking more about this after my last post. Makes sense that it doesn't work and even more sense that it has come up before, even if there's no definitive resolution.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml