Create DOM event handlers that write to listeners