Abstract
The quantal description of a cavity is extended from the case of constant mass to that of variable mass, corresponding to a decaying or driven cavity, in such a way that both Maxwell's equations and the quantal equations of motion are invariant. The method is illustrated for the case of a decaying cavity.