findDefs = function () {
  const svgElement = svgCanvas.getSvgContent()
  let defs = svgElement.getElementsByTagNameNS(NS.SVG, 'defs')
  if (defs.length > 0) {
    defs = defs[0]
  } else {
    defs = svgElement.ownerDocument.createElementNS(NS.SVG, 'defs')
    if (svgElement.firstChild) {
      // first child is a comment, so call nextSibling
      svgElement.insertBefore(defs, svgElement.firstChild.nextSibling)
      // svgElement.firstChild.nextSibling.before(defs); // Not safe
    } else {
      svgElement.append(defs)
    }
  }
  return defs
}
@function module:utilities.findDefs
@returns {SVGDefsElement} The document's `<defs>` element, creating it first if necessary