Cross WebView to Fit 100% Any Web Page | screenfit

Screenfit is a cross-platform and cross-platform web view solution that 100% fits any webpage. This JavaScript library makes your page well-suited for a screen across all browsers and platforms.

display a part of the webpage on the webview, webview resize to fit content, how to make webview responsive, webview load url, android webview fit content height

How to make use of it:

1. Enable the screenfit by merely together with the primary JavaScript in your webpage.

<!-- CDN -->
<script defer src="https://unpkg.com/screenfit"></script>
<!-- Local -->
<script defer src="min.js"></script>

2. Load polyfills for Kindle and Internet Explorer if needed.

<script data-polyfill=kindle>
  if(!Object.bind)document.write('<script src="js/kindle.js"><\x2fscript>');
</script>
<script data-polyfill=ie11>try{
  new CustomEvent('InternetExplorer')}
  catch(_){
    document.write('<script src="js/ie.js"><\x2fscript>')
  }
</script>

3. Track display size modifications and get the present data.

addEventListener('screenfit', function (event) {
  document.body.className = 'fit';
  document.querySelector('footer').textContent = [
    'current: ' + Math.round(event.detail.height),
    'inner: ' + Math.round(innerHeight),
    'avail: ' + Math.round(screen.availHeight)
  ].join(' - ');
  console.log(Math.random());
});

Make Webpage 100% Fit On The Screen, screenfit Plugin/Github, webview set width and height programmatically


See Demo And Download

Official Website(WebReflection): Click Here

This superior jQuery/javascript plugin is developed by WebReflection. For extra Advanced Usages, please go to the official website.

Related Posts

Iconpicker-Bootstrap-5

[Icon Picker] Iconpicker for Bootstrap 5 Icons Library

Bootstrap 5-based icon picker which supports any icon libraries like Bootstrap Icons, Font Awesome[fontawesome.com], etc. Must Read: 1000+ Pixel Perfect SVG Icons For Vue Components | Unicons How…

bootstrap-multiple-image-upload-with-preview

Bootstrap Multiple Image Upload with Preview and Delete | ImagesLoader

ImagesLoader is a standard bootstrap image upload plugin that provides an easy-to-use and nice-looking interface for uploading multiple images to a web server. Must Read: HTML 5…

Animating-Split-Flap-Displays-fallblatt

A Lightweight jQuery Plugin for Animating Split-Flap Displays | fallblatt

fallblatt is a lightweight jQuery plugin for animating split screens. This jQuery plugin allows you to include such offers in your web application. Everything from virtual departure…

bootstrap-5-dark-theme

Dark & Light Switch Mode Toggle for Bootstrap 5

Switching to dark mode is done by toggling HTML tags that include -dark or -light as a category. It is made by manipulating the DOM with JavaScript. The text color also changes depending…

jQuery-SyoTimer-Plugin

jQuery Plugin for Countdown Timer on HTML Page | SyoTimer

yoTimer jQuery plugin allows you to create digital style countdowns/periodic timers on the webpage, with callbacks support and timezone/translation customization. Features Periodic count with the specified period…

vue-js-periodic-table

Dynamic, Data-driven Periodic Table built with Vue.js

Periodicity is a dynamic, data-driven periodic table created with Vue.js that uses D3 animations and graphs to show the beauty of periodic trends. Built With vue.js (component…