Add an API for 'create,window' event.