Open bigopon opened 6 years ago
Well, first I think we can, and should, ignore PassThroughSlot
, as far as I can tell that's used for the cases where you have a <slot>
targeting another <slot>
, from the docs:
<slot name="slot1" slot="slot1">Fallback Content for Projected Slot 1</slot>
We probably should return later and see if it has the same issue.
Currently I'm focusing on first call/read to ShadowSlot.prototype.needsFallbackRendering
.
For root <slot>
s, on first read, it returns correctly, false
, if there is an override. projections
has already been set.
For nested <slot>
s, on first read it returns true
, if there is an override. projections
has not been set yet and is 0.
This is the path I'm following for now.
I think it could be separated into:
else if (nodeType === 1 || nodeType === 3) {
if (currentNode.viewSlot instanceof PassThroughSlot) {
// ...
} else {
// ...
}
} else {
...
}
@StrahilKazlachev lets start our discussion here