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

chore(Widget): Simplify attach/detach sanity checking #279

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

GordonSmith
Copy link
Contributor

Also makes compatible with shadowDom

Signed-off-by: Gordon Smith GordonJSmith@gmail.com

Also makes compatible with shadowDom

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @GordonSmith

Out of curiosity do you know if the isConnected is faster than contains?

caniuse report 93% for that feature.

@fcollonval fcollonval added the enhancement New feature or request label Jan 10, 2022
@GordonSmith
Copy link
Contributor Author

GordonSmith commented Jan 10, 2022

@fcollonval I don't know if it is faster, but realistically it couldn't be slower? (not that it matters as this is test is prior modifying items in the DOM which will cause reflow etc. which will be orders of magnitudes slower than either...)
Also worth noting that the "contains" test fails for shadowDom elements...

Note2: It is not supported by ie11 if that is an issue?

@fcollonval
Copy link
Member

I don't know if it is faster, but realistically it couldn't be slower?

Definitely not - it was purely for my information. I support at 100% what you are doing; I really think that moving to web components would be a great way forward to increase interest in Lumino widgets.

Note2: It is not supported by ie11 if that is an issue?

No it is not an issue. As I checked support by browsers, I added a link if people are wondering.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@blink1073 blink1073 merged commit 68ba69c into jupyterlab:main Jan 10, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants