function getRootSvg() {
  var childNodes = document.body.childNodes;
  var length = childNodes.length;
  for (var k = 0; k < length; k++) {
    var node = childNodes[k];
    if (node.tagName === 'svg' || node.tagName === 'SVG') {
      return node;
    }
  }
  return false;
}
Document root <svg> with defs and icons