The slot property of the Element interface returns the name of the shadow DOM slot the element is inserted in.
slot
MDN Reference