[ADD] Handle an option to close the window after refreshing, useful for windows…

[ADD] Handle an option to close the window after refreshing, useful for windows opened with target='new'

Merge request reports