2
0
mirror of https://github.com/tenrok/vue-native-websocket.git synced 2026-06-07 08:02:26 +03:00

Api updates (#7)

* move all instantiation options into the opts hash

* 2.0.0
This commit is contained in:
Nathan
2017-07-07 09:47:01 -07:00
committed by GitHub
parent b62cc5a27c
commit 46e251dcbc
8 changed files with 68 additions and 21 deletions
+2 -2
View File
@@ -3,10 +3,10 @@ import Emitter from './Emitter'
export default {
install (Vue, connection, protocol = '', store, opts = {}) {
install (Vue, connection, opts = {}) {
if (!connection) { throw new Error('[vue-native-socket] cannot locate connection') }
let observer = new Observer(connection, protocol, store, opts)
let observer = new Observer(connection, opts)
Vue.prototype.$socket = observer.WebSocket