The text messages weren't being displayed because an image.onload event wasn't firing.
The image was changed to an img (which shouldn't have made a difference), and the img was added to the document immediately, instead of inside the image.onload.
Merge branch 'beta' of https://github.com/priologic/easyrtc into beta