Giter Club home page Giter Club logo

Comments (7)

Jabbar2010 avatar Jabbar2010 commented on May 18, 2024 1

放弃这个插件吧,ie11g等不支持Proxy的逻辑作者没有实现好,无法使用

from vue-native-websocket.

larsmars avatar larsmars commented on May 18, 2024 1

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.

larsmars avatar larsmars commented on May 18, 2024

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.

PrinceMagbanua avatar PrinceMagbanua commented on May 18, 2024

@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 avatar larsmars commented on May 18, 2024

@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.

paulinekorkina avatar paulinekorkina commented on May 18, 2024

I've fixed the same error with @babel/polyfill

from vue-native-websocket.

Perlover avatar Perlover commented on May 18, 2024

Now in build (https://raw.githubusercontent.com/nathantsoi/vue-native-websocket/master/dist/build.js) there is Object.seal(this.$options.sockets) using

IE11 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:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal#Non-object_coercion

from vue-native-websocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.