Dramatic irony is a stylistic device that is most commonly used by storytellers, in plays, in the theater, and in movies. The irony is used as a plot device to create situations where the reader knows much more about the episodes and the resolutions before the chief character or characters.
Examples are:
In Merchant of Venice, the reader is aware that Lancelot is cheating his father openly; in Tempest, Prospero and the reader are aware of the presence of Gonzalo on the Island but Miranda does not.
In Romeo and Juliet, Romeo finds Juliet in deep and drugged slumber, assumes her dead, and kills himself ignorantly before Juliet wakes up, discovers her dead lover, and kills herself.