scripts may close only the windows that were opened by them. 2020 code example
Example: Scripts may close only the windows that were opened by them
open window with target="_blank"
and the perform window.close();
open window with target="_blank"
and the perform window.close();