move the event dispatch onto document localization