The read-only assignedSlot property of the Text interface returns the HTMLSlotElement object associated with the element.
assignedSlot
Text
HTMLSlotElement
An HTMLSlotElement, or null if no <slot> element is associated with the text node.
null
<slot>