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

incorrect result of FlattenedNodesObserver #5505

Closed
hzmsrv opened this issue Mar 6, 2019 · 5 comments
Closed

incorrect result of FlattenedNodesObserver #5505

hzmsrv opened this issue Mar 6, 2019 · 5 comments
Labels

Comments

@hzmsrv
Copy link

hzmsrv commented Mar 6, 2019

i found some elements could unlimit to list in the addedNodes. like: <img><a>
sample 1

<div>
	<slot>
		<slot>
			<img><a><a><a><a></a></a></a></a></img>
		</slot>
	</slot>
</div>

result is : <div><img><a><a><a><a></a></a></a></a></img></div>

sample 2

<div>
	<slot>
		<slot>
			<img><span><a></a></span></img>
		</slot>
	</slot>
</div>

result is : <div><img><span></span></img></div>

sample 3

<div>
	<slot>
		<slot>
			<span><a><a></a></a></span>
		</slot>
	</slot>
</div>

result is : <div><span></span></div>

@hzmsrv
Copy link
Author

hzmsrv commented Mar 6, 2019

what I want is the list the children of the slot element. is there any other method to get them without the full children tree?

@TimvdLippe
Copy link
Contributor

I think you want https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes with {flatten: true}

@hzmsrv
Copy link
Author

hzmsrv commented Mar 6, 2019

I think you want https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes with {flatten: true}

it also having above bug

@stale
Copy link

stale bot commented Mar 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 13, 2020
@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!

@stale stale bot closed this as completed Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants