Add DOM hook to indicate when 'lengthy' JavaScript operations are complete