x-websocket

WebComponent WebSocket wrapper.

Github星跟踪图

<x-websocket> Bower Version

A Polymer/WebComponent wrapper of WebSocket client.

Usage

  1. Install the component using Bower:

    $ bower install x-websocket --save
    
  2. Import Web Components' polyfill:

    <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
    
  3. Import Custom Element:

    <link rel="import" href="bower_components/x-websocket/dist/x-websocket.html">
    
  4. Start using it!

    <x-websocket url="ws://echo.websocket.org"></x-websocket>
    

Options

Attribute, Options, Default, Description
---, ---, ---, ---
url, string, undefined, WebSocket server endpoint to connect to. Usually starts with ws:// or wss://.
json, bool, false, Automatically JSON-encode sent messages and JSON-decode received messages.
jsonSend, bool, false, Automatically JSON-encode sent messages, even if json is false.
jsonReceive, bool, false, Automatically JSON-decode recieved messages, even if json is false.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

For detailed changelog, check Releases.

License

MIT License

主要指标

概览
名称与所有者elierotenberg/x-websocket
主编程语言HTML
编程语言JavaScript (语言数: 2)
平台
许可证
所有者活动
创建于2014-04-14 02:51:06
推送于2016-02-01 00:27:48
最后一次提交
发布数4
最新版本名称v0.2.0 (发布于 2014-04-14 03:10:10)
第一版名称v0.1.0 (发布于 )
用户参与
星数14
关注者数2
派生数12
提交数44
已启用问题?
问题数1
打开的问题数1
拉请求数1
打开的拉请求数1
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?