Text: assignedSlot property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

The read-only assignedSlot property of the Text interface returns the HTMLSlotElement object associated with the element.

Value

An HTMLSlotElement, or null if no <slot> element is associated with the text node.

Specifications

Specification
DOM
# dom-slotable-assignedslot

Browser compatibility

desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
assignedSlot