HTML/JAVA - On.load of iFrame

Provided below is a working code to get iFrame into fullscreen with the click of a button.
That said, what would make more sense, in my situation, is for the iFrame to simply load into fullscreen right away. I’ve tried different approaches to get it to work but nothing works:

window.onload = enterFullscreen;
<body onload="enterFullscreen();">
document.addEventListener('DOMContentLoaded', function() {
}, false);

My question is: can someone please indicate how I can get the iFrame to load in fullscreen mode right away instead of waiting for the user to click the button.

Main working code:

<!DOCTYPE html>
  <meta charset="utf-8">
<link rel="stylesheet" href=""> 
<style type="text/css"> 
 .fa_custom { background-color: black ; color: #dfdfdf ; outline:white ; position:absolute;z-index:1}
 .fa_custom:hover { background-color: black ; color: #ffffff  }
.fa_custom { top: 0; right: 0; }
 .fa_custom_exit { background-color: black ; color: #dfdfdf ; outline:white ; position:absolute }
 .fa_custom_exit:hover { background-color: black ; color: #ffffff  }
 .fa_custom_exit { top: 0; right: 0; }
    <style type="text/css">
    #fullscreen {
      background-color: transparent;
      padding: 0px;
      border: 0px solid #000;
#fullscreen:-webkit-full-screen { width: 100% ; height: 100% ; }
#fullscreen:-webkit-full-screen>button { position:absolute }
<button id="fullscreen-button" class="fa fa-arrows-alt fa_custom" style="font-size:23px"></button>
  <div id="fullscreen">
<iframe style="width:100%; height:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px;" src= "" frameborder="0" height="100%" width="100%"></iframe>
<button type="button" button id="exit-fullscreen-button" class="fa fa-arrows-alt fa_custom_exit"  style="font-size:23px;position:absolute"></button>
    var fullscreenButton = document.getElementById("fullscreen-button");
    var fullscreenDiv = document.getElementById("fullscreen");
    var fullscreenFunc = fullscreenDiv.requestFullscreen; 
     if (!fullscreenFunc) {
        'webkitRequestFullScreen'].forEach(function (req) {
          fullscreenFunc = fullscreenFunc || fullscreenDiv[req];
function enterFullscreen() {;
fullscreenButton.addEventListener('click', enterFullscreen);

var exitFullscreen = function () {
 if (document.exitFullscreen) {
 } else if (document.webkitExitFullscreen) {
 } else if (document.mozCancelFullScreen) {
 } else if (document.msExitFullscreen) {
 } else {
 console.log('Fullscreen API is not supported.');
var exitfullscreenButton = document.getElementById('exit-fullscreen-button');
exitfullscreenButton.addEventListener('click', function(e) {

import wixWindow from 'wix-window';
$w.onReady(function () {

Thanks for your time!

Java HTML support help

Unable to embed this onto the website Any solutions or methods to do? Want to test it out before subscription. If a subscription is only the way, how? ready to pay if it works!

file here:

Do you want to make the file downloadable from your site, or for the javacode to run on your site?

@simen just to run sir