New and Changed Directives for Lightning Web Components

Add dynamic behavior to an HTML template with directives.

New Directives

This directive is now available.

lwc:on={eventHandlers}
Adds event listeners to an element dynamically. You can also use this directive if you want to add event listeners whose event types are computed dynamically, for example, when passed from the owner component via @api.