Here’s one instance of ad-libbing that’s so perfect in terms of quick-thinking that surely nobody would ever suspect on face value that it actually was. As The Joker (Heath Ledger) starts exploding Gotham General Hospital, he emerges out front in full-on nurse garb, walking towards the camera.
The intention was for the explosion to start immediately, but alas, something went wrong and there was a delay, but rather than look around for conference and break character, Ledger simply shrugs, fiddles with the detonator, and a few seconds later, the explosions begin and the scene can continue like normal.
This is definitely an instance of improv that betters the film, as it serves to serendipitously foreshadow a climactic moment later on, when the Joker is about to blow up both boats but the detonator doesn’t work. It makes that instance seem less contrived, as it’s clearly established earlier that the cronies setting the charges aren’t all that reliable to begin with.