DEV Community

Lay Flags
Lay Flags

Posted on

Rolling Number Web Component

Top comments (1)

Collapse
 
dannyengelman profile image
Danny Engelman • Edited
constructor() {
    super();
    const shadow = this.attachShadow({ mode: "open" });
    shadow.innerHTML = 
Enter fullscreen mode Exit fullscreen mode

can be written as:

constructor() {
    super() // sets and returns 'this' scope
      .attachShadow({ mode: "open" }) // sets and return this.shadowRoot
      .innerHTML = 
Enter fullscreen mode Exit fullscreen mode