UNPKG

358 Btext/coffeescriptView Raw
1Clay = require './index'
2
3shareBtn = document.createElement('button')
4shareBtn.innerText = 'Share.any()'
5shareBtn.style.padding = '20px'
6shareBtn.style.fontSize = '30px'
7document.body.appendChild(shareBtn)
8
9
10Clay 'init', gameId: '1'
11
12shareBtn.addEventListener 'click', ->
13 Clay 'client.share.any', [{text: 'abc'}], (err) ->
14 if err
15 console.log err