Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knowler/custom-element-lifecycle-element
A custom element for learning about the lifecycle of custom elements
https://github.com/knowler/custom-element-lifecycle-element
custom-elements web-components
Last synced: 22 days ago
JSON representation
A custom element for learning about the lifecycle of custom elements
- Host: GitHub
- URL: https://github.com/knowler/custom-element-lifecycle-element
- Owner: knowler
- Created: 2023-12-16T20:38:35.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-16T20:39:19.000Z (11 months ago)
- Last Synced: 2024-10-08T09:22:35.515Z (about 1 month ago)
- Topics: custom-elements, web-components
- Language: JavaScript
- Homepage: https://knowler.github.io/custom-element-lifecycle-element/demo
- Size: 2.93 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom Element Lifecycle Element
This `` element is purely to demonstrate when different points in a custom element’s lifecycle occur. [View the demo](https://knowler.github.io/custom-element-lifecycle-element/demo), open the console, and watch the log.
## Defining
You can define it the standard way or use the static `define()` method:
```javascript
import { CustomElementLifecycleElement } from "https://esm.sh/gh/knowler/custom-element-lifecycle-element/custom-element-lifecycle-element.js?raw";CustomElementLifecycleElement.define();
```## Usage
Just add the element to the page. It visually doesn’t do anything. It’s mainly valuable to watch in the console. Try adding attributes to it, moving it into a form, etc.```html
```