Cordoba inappbrowser fits the screen image (ios)

Is it possible to place an image on the screen in cordova?

If I use ref.executeScript to set the image width to 100% of the screen, it gets set, but the page size is larger than the screen and I can scroll to the left

var ref = window.open(path, param, "location=no,suppressesIncrementalRendering=yes,enableViewportScale=yes");
     ref.addEventListener('loadstop', function() {
     ref.executeScript({ 
                 code: "var imageResize = document.querySelectorAll('img'); var screenWidth = window.innerWidth; for (var i = 0; i < imageResize.length; i++) {imageResize[i].style.width = screenWidth + 'px';}"  });
      });

      

+3


source to share





All Articles