-
-
Notifications
You must be signed in to change notification settings - Fork 9
fix: 🐛 support Shadow DOM #75
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
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one...
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This...
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this.
Awesome, will do! |
See #31 (comment)
Fixes #31