There is a page which adds a call to a js script, it adds to the iframe tag. After adding it the script again. I need to enter a function that will run once. the flag doesn't work because the variable is overridden. The listener for downloading iframe is activated every time when you change the page inside iframe.