fix: 🐛 support Shadow DOM#75
fix: 🐛 support Shadow DOM#75huntabyte merged 8 commits intosvecosystem:nextfrom songpola:refactor-attachRef
Conversation
🦋 Changeset detectedLatest commit: 53a3158 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
commit: |
|
Hey @songpola thanks for getting this kicked off. Would you mind testing out |
|
@huntabyte Thanks for the update. It turns out I'm doing the same changes as you! Testing now... |
|
Context Expected Actual Reasons The This is because In But there are also other methods in the Solution P.S. Don't worry, this is not from AI. It's just my style of writing 😅 |
|
I've done the refactoring, and I can confirm the handle is working in Shadow DOM now! |
songpola
left a comment
There was a problem hiding this comment.
Maybe adding generics to these methods in the svelte-toolbelt?
So, we don't have to do the type assertions.
| doc.querySelectorAll(`[data-pane-resizer-id][data-pane-group-id="${groupId}"]`) | ||
| domContext.querySelectorAll( | ||
| `[data-pane-resizer-id][data-pane-group-id="${groupId}"]` | ||
| ) as NodeListOf<HTMLElement> |
| const element = doc.querySelector<HTMLElement>(`[data-pane-group][data-pane-group-id="${id}"]`); | ||
| const element = domContext.querySelector( | ||
| `[data-pane-group][data-pane-group-id="${id}"]` | ||
| ) as HTMLElement; |
| export function getResizeHandleElement(id: string, domContext: DOMContext): HTMLElement | null { | ||
| if (!isBrowser) return null; | ||
| const element = doc.querySelector<HTMLElement>(`[data-pane-resizer-id="${id}"]`); | ||
| const element = domContext.querySelector(`[data-pane-resizer-id="${id}"]`) as HTMLElement; |
|
Awesome, will do! |


See #31 (comment)
Fixes #31