refactor source code and add log to check dom event with url.