Call window.close() directly:
    For IE, window.close works well.
    For Firefox and Chrome, window.close will not work.
window.close()  is only allowed to be called for windows that were opened by a script using the window.open method.
Please see https://developer.mozilla.org/en-US/docs/Web/API/Window.close
thanks.