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

enhancement - children of a slot element #44

Open
gullerya opened this issue Apr 18, 2021 · 0 comments
Open

enhancement - children of a slot element #44

gullerya opened this issue Apr 18, 2021 · 0 comments

Comments

@gullerya
Copy link

I've came to this lib from the swiper one, thanks for both!!!

I'm attempting to use swiper in a custom element, while leaving to the consumer to provide the slides as slotted elements from the light DOM, for example to be able to style them.

swiper as of now doesn't play well with this, seemingly due to this line here:

const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);

Since this method children belongs to dom7, I'm writing here :)

If the children method would be re-written in a following fashion (meta code), I think that would give us a correct behaviour:

if this is slot and assigned elements not empty {
  extract from assigned elements
} else {
  extract from children
}

WDYT?

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

1 participant