I am trying to implement gestures with my lit-element
using the library: https://github.com/composi/gestures
At the top of my file I have the following:
import { gestures } from '@composi/gestures'
gestures();
Then in my render function I have:
render() {
return html`
<div class="tablet-menu " id="tablet-menu-T">
<div class="tablet-menu-body" on-swipe="${this._swipe}">
....
However the _swipe
function is never called, so it doesn't seem that it registers the swipe command.
What have I done wrong?
Make it arrow function
Maybe syntax of my answer is wrong, but you have to apply it with arrow function