JavaScript: Subscribe to channel

Creates an event handler that listens to changes.

Parameters