switch from onmessage to this.onmessage

fixes the JS examples
Merge pull request #28 from slang800/patch-1

switch from onmessage to this.onmessage