Git Product home page Git Product logo

Comments (5)

dcodeIO avatar dcodeIO commented on July 23, 2024

Imho it's not worth the trouble to extract only the parser from the library as all of its output is made for ProtoBuf.js only and there usually is no other library that understands it. However, it should be possible to use the general build without modifications and to just call the parser only, which is located at ProtoBuf.DotProto.Parser. As far as I am concerned, this should not break in IE as long as none of the unsupported features are actually used. Or am I wrong?

from protobuf.js.

marchtea avatar marchtea commented on July 23, 2024

As far as i know, IE(before IE10) doesn't support ArrayBuffer. So I remove encode and decode function.And also, IE8 doesn't support Object.keys and eval not works great as well.When using ProtoBuf.js with IE8, it will report some error. So i add some code to fix that.

from protobuf.js.

chenwenfeng avatar chenwenfeng commented on July 23, 2024

how can i use to support ie8, can you give me a example? thx

from protobuf.js.

marchtea avatar marchtea commented on July 23, 2024

See my work

from protobuf.js.

dcodeIO avatar dcodeIO commented on July 23, 2024

Thanks marchtea, I appreciate your efforts!

Regarding IE8 support in general: ProtoBuf.js respectively ByteBuffer.js relies on the typed array specification for efficient encoding and decoding, which unfortunately isn't supported in older browsers. There are, however, polyfills available to support typed arrays in one or another way and, if you load these before ProtoBuf.js, it should theoretically work within IE<9: For me, the most promising one is: https://github.com/inexorabletash/polyfill/blob/master/typedarray.js

ByteBuffer.js itself has been patched a few months ago to explicitly support polyfills like that: protobufjs/bytebuffer.js#5

Hope this helps!

from protobuf.js.

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.