A <script> data block would be the officially sanctioned way to do it. (This use case is part of the spec.)