code: function (el) {
          var bounding = el.getBoundingClientRect();
          return (
              bounding.top >= 0 &&
              bounding.left >= 0 &&
              bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
              bounding.right <= (window.innerWidth || document.documentElement.clientWidth)
          );
      }
docs: Check if element is fully in viewport
  
  @param {object} el - popup instance DOM node