| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Web/API/Web_components | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
- - , , - -.
, , - . - HTML ( ), UI, , .
- - , , , .
<template> <slot> , . .- :
CustomElementRegistry.define(), , , , , , , .Element.attachShadow(). , .. DOM, DOM.<template> <slot>. DOM, DOM., , -, .
, DOM, , DOM , DOM, .
, , HTML <template> <slot>, -.
CustomElementRegistry , , CustomElementRegistry.define(), , .
Window.customElements CustomElementRegistry.
-, , :
connectedCallback: , DOM .disconnectedCallback: , DOM .adoptedCallback: , .attributeChangedCallback: , .
is: , HTML .Document.createElement(): HTML-, ., :
, :
ShadowRootDOM.
DocumentOrShadowRoot, , .
Element Element, DOM:
Element.attachShadow() DOM .Element.shadowRoot , , null, .Node Node, DOM:
Node.getRootNode() , , .Node.isConnected , , ( ) , Document DOM ShadowRoot DOM.Event Event, DOM:
Event.composed: Boolean, , DOM DOM (true) (false).Event.composedPath: (, ). , ShadowRoot.mode.<template> HTML, , JavaScript, . DOM - HTMLTemplateElement.
<slot> -, , DOM . DOM - HTMLSlotElement.
slotDOM.
Slotable, Element, Text, , <slot>. , Slotable.assignedSlot, , .
Element extensions Element, :
Element.slot: DOM, ., :
::slotted: , .slotchange HTMLSlotElement ( <slot>) (-), .
GitHub -. .
| Specification |
|---|
| HTML # the-template-element |
| DOM # interface-shadowroot |
class this . API .This page was last modified on 24 . 2025 . by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |