code: function handleDocumentMousedown() {
    path = null;
    lines = [];
  
    document.addEventListener('mousemove', handleDocumentMousemove);
    document.addEventListener('mouseup', handleDocumentMouseup);
  }
docs: Handle document.mousedown event