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