You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
In the context of a custom element, would it be better to have the inView being registered in the constructor or the connectedCallback? As connectedCallback can be called more than once, I think it makes it a not so good candidate, but I wonder if there is any potential drawback of having this being registered in the constructor, at a stage where the element may not be in the DOM yet?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi :),
In the context of a custom element, would it be better to have the inView being registered in the constructor or the connectedCallback? As connectedCallback can be called more than once, I think it makes it a not so good candidate, but I wonder if there is any potential drawback of having this being registered in the constructor, at a stage where the element may not be in the DOM yet?
Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions