Im trying to close a child window with javascript and in firefox everything works fine but in chrome the window doesnt close
here is what im using
$(
top.window.close() works for me. Tested on IE, FF, Chrome, Safari and Opera.
Something like this should also work:
setTimeout(function() {
window.close();
},50);
This worked for me
var win = window.open("about:blank", "_self");
win.close();
I know this question is old, but I ran into the same problem. This worked for me:
window.open('', '_self', ''); //bug fix
window.close();
I think it's working in Chrome Kiosk ( Fullscreen ) mode. Tried successfully.
If previously you open some other window by window.open()
This don't work:
window.open(...)
window.open('', '_self', '');
window.close();
But work:
window.open(...);
setTimeout(function(){
window.open('', '_self', '');
window.close();
}, 100);