Imperative slot assignment
The assign() method for <slot> elements assigns nodes to the slot, as an alternative to using the slot and name HTML attributes. The nodes must be children of a shadow host and the shadow root must be created with the slotAssignment set to "manual". Also known as manual slot assignment.
Status
Baseline Widely Available (since 2025-09-27)
MDN documentation
Specifications
- HTML (#dom-slot-assign), from HTML Workstream (WHATWG).
Browser support
- Chrome 92 Released on 2021-07-20
- Chrome Android 92 Released on 2021-07-20
- Edge 92 Released on 2021-07-22
- Firefox 92 Released on 2021-09-07
- Firefox for Android 92 Released on 2021-09-07
- Safari 16.4 Released on 2023-03-27
- Safari on iOS 16.4 Released on 2023-03-27
Surveys
- State of HTML 2025 > web components > web components features
- State of HTML 2025 > features > all features
- State of HTML 2024 > web components > web components features
- State of HTML 2024 > web components > web component features
- State of HTML 2024 > features > all features
- State of HTML 2023 > web components > web components main features
- State of HTML 2023 > features > all features
Usage (according to Chrome Platform Status)
~0.006% of page loads. More data at chromestatus.com.Web Platform Tests (WPT)
View the latest WPT test results for this featureView as JSON | Edit this feature | Report an issue | Web-features entry: source, dist