Skip to content

Commit 4c693a2

Browse files
authored
Update article.md
1 parent a4877df commit 4c693a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

8-web-components/5-slots-composition/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ If we'd like to track internal modifications of light DOM from JavaScript, that'
381381

382382
Finally, let's mention the slot-related JavaScript methods.
383383

384-
As we've seen before, JavaScript looks at the "real" DOM, without flattening. But, if the shadow tree has `{mode: 'open'}`, then we can figure out which elements assigned to a slot and, vice versa, the slot by the element inside it:
384+
As we've seen before, JavaScript looks at the "real" DOM, without flattening. But, if the shadow tree has `{mode: 'open'}`, then we can figure out which elements assigned to a slot and, vice-versa, the slot by the element inside it:
385385

386386
- `node.assignedSlot` -- returns the `<slot>` element that the `node` is assigned to.
387387
- `slot.assignedNodes({flatten: true/false})` -- DOM nodes, assigned to the slot. The `flatten` option is `false` by default. If explicitly set to `true`, then it looks more deeply into the flattened DOM, returning nested slots in case of nested components and the fallback content if no node assigned.

0 commit comments

Comments
 (0)