Refs #21068 - Add javascript-delay option per PDF Theme

- Add possibility to wait for javascript to finish