This is actually the origin of the traditional ninja costume. In kabuki theater, the stagehands were clothed head to toe in black, which made them easy to ignore. As long as they were ignored, they were invisible. Thus, when ninja characters were put in the same outfit, they were ignored, too... right until they jumped out and became part of the production. The actors of course pretended they weren't there in-universe, just as the audience essentially was trained to ignore them.
Given the difficulty in transferring Terry Pratchett's famous footnotes to the stage, the play adaptation of Guards! Guards! recommends having someone in a footnote costume — complete with a label on their shirt — step on stage, hit a klaxon to get everyone to freeze, deliver the footnote, hit the klaxon, and then leave as everyone goes back to normal.
In another Discworld play, Discworld/Maskerade, this is the recommended way of portraying the impossible talents of Agnes Nitt: for the singing lesson scene, the script recommends that 'Agnes' stands at the back of the auditorium, with Dr. Undershaft facing out to speak to her, and her singing, which is all pre-recorded, is played in by P.A. This covers for the fact that Agnes is supposed to be an uncannily good mimic (and the fact that the plays are usually performed by non-professionals, and so her abilities are usually created with trick recording)— it's less awkward than having the actress mime.
Shakespeare's plays include a number of jokes based on the custom that the female roles were played by men.
Jean Racine got some of his best effects by inflicting small, perfectly calculated cracks in the weirdly rigid wall of conventions that defined 17th-century French theatre. Take Phèdre: to the tastemakers of King Louis' court, it was obvious—virtually holy writ—that a stage is immaculately unfurnished, and that royal personages never show weakness. In that environment, putting a chair into the opening scene and having a queen collapse into it had an effect not unlike rolling a grenade onto the stage. It was Racine's economical way of announcing "hang on, because all bets are now off."
Hamilton bleeps out the line "Sit down, John, you fat motherfuckstick!" This line occurs during the Adams administration, who supported the Alien and Sedition Acts, which criminalized criticizing the government. Elsewhere in the play, use of "fuck" is uncensored.