add fix "exceeding maximum call stack" error which caused by mistakenly calling to self.XXX()
add tests for on/off/emit under Gadget