I have a SharePoint web part installed and added to one of the SharePoint TeamSite pages. The web part is having a "SharePointFullPage" option enabled. When the web part is loaded in the browser, it has a little "full screen" toggle icon at the top right, which when clicked makes the page in full-screen mode.
I want my web part to go to the full page automatically using JavaScript, once the page is loaded without clicking that toggle button explicitly. Is there any SharePoint provided function that can help accomplish this? I have tried a workaround by manually hiding the appbar, siteheader etc. but it only works by double click on that toggle button. Any answer?