devide invoke events with and without document