changeSelectedAttributeMethod = function (attr, val, elems) {
  const selectedElements = svgCanvas.getSelectedElements()
  elems = elems || selectedElements
  svgCanvas.undoMgr.beginUndoableChange(attr, elems)

  changeSelectedAttributeNoUndoMethod(attr, val, elems)

  const batchCmd = svgCanvas.undoMgr.finishUndoableChange()
  if (!batchCmd.isEmpty()) {
    // svgCanvas.addCommandToHistory(batchCmd);
    svgCanvas.undoMgr.addCommandToHistory(batchCmd)
  }
}
Change the given/selected element and add the original value to the history stack.
If you want to change all `selectedElements`, ignore the `elems` argument.
If you want to change only a subset of `selectedElements`, then send the
subset to this function in the `elems` argument.
@function module:svgcanvas.SvgCanvas#changeSelectedAttribute
@param {string} attr - String with the attribute name
@param {string|Float} val - String or number with the new attribute value
@param {Element[]} elems - The DOM elements to apply the change to
@returns {void}