;

            const highlightableIndex = getTouchEventHighlightableIndex(e);
            if (typeof highlightableIndex == "number") {
              app.ports.highlighterOnTouchEvent.send([
                type,
                id,
                highlightableIndex,
              ]);
            }
          };
        }

        /*
         * inform elm when we receive a mouseup/touchend event.
         */
        function onDocumentUp(id, device) {
          return function () {
            app.ports.high