Chapter 6. Markup managed

This chapter covers

  • Multiline string syntaxes
  • ES2015 template literals (with variables)
  • Templating HTML/CSS using JS logic and functions
  • Templating with lit-html
  • Tagged templates

This chapter will keep building on what we’ve learned from previous chapters, especially the last one, where we learned about modules. So far, we’ve managed to create self-reliant Web Components that load their own dependencies, including other Web Components. With this, our index.html is minimal. Between this, learning to use attributes, and building our own component API in chapter 4, we essentially cleaned up our use of Web Components from the outside looking in.

We left off with a somewhat messy-looking component on the inside, however. ...

Get Web Components in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.