instead of passing all messages just pass messages that javascript could...

... use.