As defined in the Shadow DOM
The Element.attachShadow() method attaches a shadow DOM tree to the specified element and returns a reference to its ShadowRoot.
This text is now purple.
Note that you can attach a shadow root to basic HTML Elements. Not only Custom Elements.