Tick generator using interval.

Close #1166.
dom -> domain

There is a concept of DOM in html which could easily be confusing.