automatically detects DOM changes and fires an event