2.2.8 • Published 2 years ago

@stefanholzapfel/lit-helpers v2.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

lit-helpers

A utility library for Lit 2

npm install @stefanholzapfel/lit-helpers

This package includes some helper controllers and directives.

Programmatically add callbacks to execute when LitElement is detached from DOM.

@customElement('my-element')
export class MyElement extends LitElement{
    // Create the controller and store it
    private domDetachmentController = new DomDetachmentController(this);
    
    anyElementFunction() {
        this.domDetachmentController.addLogic(() => {
            // do something, e.g. clean up dynamically created subscriptions
        })
    }
}
2.2.8

2 years ago

2.2.7

2 years ago

2.2.6

3 years ago

2.2.5

3 years ago

2.2.4

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.1.1

3 years ago

2.1.0

4 years ago

2.0.0

4 years ago