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
fc = div.firstChild;
div.removeChild(fc);
fc.parentElement; <-- is null.
I would expect the following to return null:
.beforePseudo::before { content: "before"; }
before = target.pseudo("::before");
div.classList.remove("beforePseudo");
before.parent; <-- should be null, since the pseudo is now ~"detached from DOM"?
So, I guess that parent and element attributes of CSSPseudoElement interface should be nullable?
Maybe? I think ::before / ::after's relationship with the DOM is not super well defined. Implementation wise we do remove them, but I think per spec they're supposed to be always present?
Not sure, I think we need to define whether changing / removing the content property removes the pseudo element or not. Same for display. Also same for elements that don't generate these like input elements. What does the spec say for those?
The problem with your class list example is that it'd require .parent to synchronously run styling right? Which is a bit surprising at least, and a perf footgun
https://drafts.csswg.org/css-pseudo-4/#CSSPseudoElement-interface has
but, given the outcome of #3607, and e.g.
I would expect the following to return null:
So, I guess that
parent
andelement
attributes of CSSPseudoElement interface should be nullable?@emilio @fantasai ?
The text was updated successfully, but these errors were encountered: