code: function () {
        if (!autofill.handle) {
          autofill.handle = new Handsontable.FillHandle(self);
          autofill.fillBorder = new Handsontable.Border(self, {
            className: 'htFillBorder'
          });
  
          $(autofill.handle.handle).on('dblclick', autofill.selectAdjacent);
        }
        else {
          autofill.handle.disabled = false;
          autofill.fillBorder.disabled = false;
        }
  
        self.rootElement.on('beginediting.handsontable', function () {
          autofill.hideHandle();
        });
  
        self.rootElement.on('finishediting.handsontable', function () {
          if (selection.isSelected()) {
            autofill.showHandle();
          }
        });
      }
docs: Create fill handle and fill border objects