Comments (7)
放弃这个插件吧,ie11g等不支持Proxy的逻辑作者没有实现好,无法使用
from vue-native-websocket.
This is not a solution and this bug should not be marked as "fixed" this is a work around/hack
to make the application not crash into a ditch if using IE11:
Only mount the plugin if modern browser
In your main.js file:
import VueNativeSock from 'vue-native-websocket'
if (!(window.ActiveXObject) && 'ActiveXObject' in window) {
store.dispatch('app/setModernBrowser', false)
} else {
Vue.use(VueNativeSock, wsUrl(), {
store: store,
connectManually: true,
format: 'json'
})
store.dispatch('app/setModernBrowser', true)
}
from vue-native-websocket.
I have the same:
Please make a work around for IE11
[Vue warn]: Error in created hook: "TypeError: Object.seal: argument is not an Object"
"vue": "^2.5.17",
"vue-native-websocket": "^2.0.9",
"@vue/cli-plugin-babel": "^3.0.1",
"@vue/cli-plugin-eslint": "^3.0.1",
"@vue/cli-plugin-unit-jest": "^3.0.1",
"@vue/cli-service": "^3.0.1",
from vue-native-websocket.
@larsmars this guy made it work without using Proxy object. Tested it and it works properly.
https://www.npmjs.com/package/vue-native-websocket-es5
from vue-native-websocket.
@larsmars this guy made it work without using Proxy object. Tested it and it works properly.
https://www.npmjs.com/package/vue-native-websocket-es5
What did he do? That package ref. to this repo.
Will it work properly on IE11?
from vue-native-websocket.
I've fixed the same error with @babel/polyfill
from vue-native-websocket.
Now in build (https://raw.githubusercontent.com/nathantsoi/vue-native-websocket/master/dist/build.js) there is
Object.seal(this.$options.sockets)
usingIE11 doesn't know what it is & will throw error. I think need to include polyfill for Object.seal or mention about it in readme
I think it's because the this.$options.sockets
is not the object (i think it's undefined
) and IE11 follows to ES5 code:
from vue-native-websocket.
Related Issues (20)
- I refactored this plug-in so that it can work on vue3. Interested developers are welcome to use it.
- onopen is not work online but working by npm run dev (2.0.14)
- npm audit - several high severity issues - Please Update
- Property '$socket' does not exist on type But it works well
- Token in base url
- Connect server response to request
- Multiple connections
- Help Wanted: Websocket keeps disconnecting HOT 1
- Looking for maintainers HOT 6
- "TypeError: Unable to set undefined or null-referenced property "onMessage"" -IE10
- Reconnecting : Uncaught TypeError: Illegal invocation
- Mismatched v2.0.15 releases HOT 1
- Closing after sending message
- How do I manually link again after manually disconnecting using automatic links
- missing declaration file for module HOT 1
- Need to update dependencies to fix critical vulnerabilities HOT 1
- Using Pinia instead of Vuex HOT 2
- Do you support webpack-dev-server v4? HOT 2
- 重复连接的问题?
- I see a lot of npm WARM deprecations when installing npm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-native-websocket.