change window.* IPC calls to fakeWindow to properly implement .close()

window.close() is different from (FakeWindow object).close()