code: function (referenceNode, newElement, position) {
          if (!(referenceNode instanceof HTMLElement) || !(referenceNode.parentElement instanceof HTMLElement)) {
              throw new Error('target and element must be a node');
          }
          referenceNode.parentElement.insertBefore(newElement, (position === 'before' ? referenceNode : referenceNode.nextElementSibling));
      }
docs: /* eslint-env browser 
  Insert node before or after target
  @param {HTMLElement} referenceNode - reference element
  @param {HTMLElement} newElement - element to be inserted
  @param {String} position - insert before or after reference element