Fix use of event namespace on window object