More proof-of-concept.
Yes, it works.  Would setting innerHTML be cleaner, though?