User Tools

Site Tools


web_component

Table of Contents

Web Component

Basic concept

  • npm: npm is a package manager for the JavaScript programming language maintained by npm, Inc., a subsidiary of GitHub. npm is the default package manager for the JavaScript runtime environment Node.js. package.json is the file you put at the root path of your project, you use to tell npm what package to install in this folder, it also contains project information.
  • lit: https://lit.dev The “lit” package is a library for building fast, lightweight web components. It provides developers with tools to create web components that are both efficient and easy to use. It is one of the libraries for building web-component.

Learn

  1. “hello world” example of lit. https://lit.dev/playground/
  2. <template> tag: The <template> HTML element serves as a mechanism for holding HTML fragments, which can either be used later via JavaScript or generated immediately into shadow DOM. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template
web_component.txt · Last modified: 2024/10/09 22:52 by admin