Search code examples
javascripthtmlgoogle-apps-script

Google Sheets App Script HTML Page Hide close (X) button


I have created a html user interface for my google sheet using google app script. I would like to prevent the user from closing the html page and getting back to the spreadsheet. Is there a way to disable or hide the X in the top right hand corner of the html page. Thanks in advance


Solution

  • That is not possible. Your UI is contained in its own IFRAME and it originates from a different domain so CORS rules apply. Since Google does not allow 3rd party apps to access the parent DOM there is no way for you to access the dialog element that contains the close button.