Progress on new API
Simplified API, fail on empty message

* `onmessage` handler can now be set directly
* now throws when trying to send `null` message