Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elierotenberg/x-websocket
WebComponent WebSocket wrapper.
https://github.com/elierotenberg/x-websocket
Last synced: 3 months ago
JSON representation
WebComponent WebSocket wrapper.
- Host: GitHub
- URL: https://github.com/elierotenberg/x-websocket
- Owner: elierotenberg
- Fork: true (webcomponents/polymer-boilerplate)
- Created: 2014-04-13T18:51:06.000Z (over 10 years ago)
- Default Branch: gh-pages
- Last Pushed: 2016-01-31T16:27:48.000Z (almost 9 years ago)
- Last Synced: 2024-09-21T12:02:19.541Z (3 months ago)
- Language: HTML
- Homepage:
- Size: 512 KB
- Stars: 14
- Watchers: 4
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# <x-websocket> ![Bower Version](https://badge.fury.io/bo/element-boilerplate.svg)
> A Polymer/WebComponent wrapper of WebSocket client.
## Usage
1. Install the component using [Bower](http://bower.io/):
```sh
$ bower install x-websocket --save
```2. Import Web Components' polyfill:
```html
```3. Import Custom Element:
```html
```4. Start using it!
```html
```## 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](https://github.com/elierotenberg/x-websocket/releases).
## License
[MIT License](http://opensource.org/licenses/MIT)