Please do not read the following if you have never read Oedipus or are unfamiliar with the plot of the play, in case it spoils the reading for you:
In Sophocles’ play Oedipus the King, the dramatic irony of much of Oedipus’ earlier words is not revealed until we learn from Teiresias that Oedipus is the man responsible for killing King Laius and setting the plague upon Thebes. Early in the play, Oedipus says the following lines:
For whoso slew that king might have a mind
To strike me too with his assassin hand.
Therefore in righting him I serve myself
Here’s the source for the edition I’m using, if you’re wondering.
My question is the following: could the above lines be considered dramatic irony even though they occur before the scene in which the audience learns the truth from Teiresias? That is, upon reading Teiresias’ revelation, could one consider the preceding material to be dramatically ironic, even though one was ignorant of the information at the time it was read?
I think it depends on how narrowly you want to define dramatic irony. Conceptions of irony are notoriously slippery.
After defining dramatic irony here (p. 102) the author then defines retrospective irony, which seems to be the phenomenon you’ve isolated. The discussion is about opera, but it generalizes easily to all drama.
I disagree with the commenter @StoneyB who suggests that what you’ve isolated illustrates the classic definition of dramatic irony. You’ve pointed out a real, finer-grained phenomenon: a passage that becomes ironic or is recognized as ironic only after later information is revealed and is appreciated only after re-reading or on the basis of memory.
Retrospective irony seems the perfect term for this, and it might be classified as a subtype of the wider category of dramatic irony or not classified as a subtype, depending on how you want to define the latter.