Coder Social home page Coder Social logo

Comments (7)

amitguptagwl avatar amitguptagwl commented on July 18, 2024

which version are you trying?

from fast-xml-parser.

zeng450026937 avatar zeng450026937 commented on July 18, 2024

i'm using version 3.3.6.
the only one for/in loop in j2x.js, is writed like

for (const v in cdata) {}

it might not work properly in older version of browser.

from fast-xml-parser.

amitguptagwl avatar amitguptagwl commented on July 18, 2024

Please always fill the issue template while raising an issue. It avoids long communication and helps to understand and resolve problem fast.

I've checked the bundle file. And I can't find any occurrence of const. Can you please tell me the following

  • Have you tried to run the demo in the browser where you are facing the issue?
  • Are you using the browser library from cdn or from git repository?

What I can see in the code is

for (var v in cdata) {
//come code
}

from fast-xml-parser.

zeng450026937 avatar zeng450026937 commented on July 18, 2024

I'm using yarn for my pkg manager.
I use the version(3.3.6) in my project, and it is failed to run in firefox45.

for (const v in cdata) {
// some code
}

above code was found in the j2x.js file in main branch, which is what I'm using.


while below code you see, which may be found in the dev branch, and 'var' is used instead.

for (var v in cdata) {
// some code
}

from fast-xml-parser.

amitguptagwl avatar amitguptagwl commented on July 18, 2024

What I can understand from your comment, you are using FXP in your node package. Then you're building browser bundle. If yes then you should use browser bundler which can transform ES6 syntax to ES5. If no then you should use js file from lib of FXP github repository, or from cdn.

You should try running demo first in browser which use js file from lib folder of FXP github repo. (as I asked in previous comment)

The code I referred is from master branch of FXP.

from fast-xml-parser.

zeng450026937 avatar zeng450026937 commented on July 18, 2024

If that, change the main file in package.json to lib folder will be good for all user. if someone uses it to build for browser, usually node modules will not be processed.

from fast-xml-parser.

amitguptagwl avatar amitguptagwl commented on July 18, 2024

I'm not sure if it is the right approach. As we did it for some build in past but then reverted back. However I've done a small change. So please try 3.3.7.

from fast-xml-parser.

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.