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