code: function getChildElementCount(element) {
      if (element.children) {
        return element.children.length;
      }
      if (typeof element.childElementCount !== 'undefined') {
        return element.childElementCount;
      }
      var count = 0;
      for (var i = 0; i < element.childNodes.length; i++) {
        count += element.nodeType === 1 ? 1 : 0;
      }
      return count;
    }
docs: webkit browsers don't currently support 'children' on SVG elements...