x-websocket

WebComponent WebSocket wrapper.

  • Owner: elierotenberg/x-websocket
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

<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

Main metrics

Overview
Name With Ownerelierotenberg/x-websocket
Primary LanguageHTML
Program languageJavaScript (Language Count: 2)
Platform
License:
所有者活动
Created At2014-04-13 18:51:06
Pushed At2016-01-31 16:27:48
Last Commit At
Release Count4
Last Release Namev0.2.0 (Posted on 2014-04-13 21:10:10)
First Release Namev0.1.0 (Posted on )
用户参与
Stargazers Count14
Watchers Count3
Fork Count12
Commits Count44
Has Issues Enabled
Issues Count1
Issue Open Count1
Pull Requests Count1
Pull Requests Open Count1
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private