We extend finite dimensional Chern-Simons theory to certain infinite dimensional principal bundles with connections, in particular to the frame bundle FLM→LM over the loop space of a Riemannian manifold M. Chern-Simons forms are defined roughly as in finite dimensions with the invariant polynomials replaced by appropriate Wodzicki residues. This produces odd dimensional R/Z-valued cohomology classes on LM if M is parallelizable. We compute an example of a metric on the loop space of S3×S1 for which the three dimensional Chern-Simons class is nontrivial.