code: function setUp() {
                 function refit() {
                    if( !resizeToFit( iframe ) ) {
                       // iframe has gone away
                       $window.clearInterval( interval );
                    }
                 }
  
                 const information = scope.resources.medium.mediaInformation;
                 const mediaSizeAvailable = information && information.pixelWidth && information.pixelHeight;
  
                 if( mediaSizeAvailable ) {
                    const pixelWidth = information.pixelWidth;
                    const pixelHeight = information.pixelHeight;
                    setPixelDimensions( iframe, pixelWidth, pixelHeight );
                 }
                 else if( scope.model.isSameOrigin && scope.model.canBeMeasured ) {
                    iframe.setAttribute( 'scrolling', 'no' );
                    interval = $window.setInterval( refit, MEASURE_INTERVAL_MS );
                    scope.$on( '$destroy', cleanUp );
                 }
              }
docs: ////////////////////////////////////////////////////////////////////////////////////////////////