Add script event observer to detect dom append event