Hi @Babak Salimi ,
If you are using <iframe> tag to reference a html file in SharePoint Online page, try to set sandbox property to "allow-same-origin allow-scripts allow-popups allow-forms" like this:
blocked-script-execution-in-because-the-documents-frame-is-sandboxed-angular
Or in SharePoint Online classic experiece, you could also use Script Editor Web Part to inject custom html and JavaScript into the page directly:
Script Editor Web Part in SharePoint 2016/2013/Online
Thanks
Best Regards
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.