2.2.8 • Published 1 year ago

@stefanholzapfel/lit-helpers v2.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

2.2.7

1 year ago

2.2.6

1 year ago

2.2.5

1 year ago

2.2.4

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.1.1

2 years ago

2.1.0

3 years ago

2.0.0

3 years ago