removed duplicated code in DomElement
moved some functions to DomElement from _client_test.js
moved all mouse events to DomElement