Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in IE11 with browser version of citation-js #87

Closed
ghost opened this issue Sep 17, 2017 · 10 comments · Fixed by #132
Closed

Error in IE11 with browser version of citation-js #87

ghost opened this issue Sep 17, 2017 · 10 comments · Fixed by #132
Assignees
Labels
bug Something isn't working right
Projects

Comments

@ghost
Copy link

ghost commented Sep 17, 2017

Hi,

when using the latest unminified version of citation-js (Version 0.3.4.) for the browser** I get the following error in the Internet Explorer 11 which halts the script execution.

SCRIPT1004: ';' expected
File: citation-0.3.4.js, Line: 14582, Row: 25

I suspect it has something to do with for statements of the following kind:

for (var [varName] of ...) { ... }

The error occurs also in the official browser demo, however, I don't know which version of citation-js is used there.

** Source: https://github.com/larsgw/citation.js/tree/archive/citation.js

@larsgw larsgw self-assigned this Sep 18, 2017
@larsgw larsgw added the bug Something isn't working right label Sep 18, 2017
@larsgw
Copy link
Owner

larsgw commented Sep 18, 2017

Thanks for the report, I can reproduce it. It seems that the building tools don't target IE11 like they're supposed to. I'll look into it.

I update the browser demo once in a while, and currently it's using v0.3.4. The version can be looked up with Cite.version.cite in the console, assuming Cite is available.

@larsgw
Copy link
Owner

larsgw commented Sep 18, 2017

Nevermind, the reason seems to be that citeproc-js gets ignored, because the file is too big for babel for regular parsing and the abnormal parsing caused other errors (and I thought it had sufficient browser support anyway). I'll look into other ways to solve that issue, which should solve this one.

@ghost
Copy link
Author

ghost commented Sep 18, 2017

Thanks for the quick response. Did you already try another nextGen JS compiler like traceur?

If not let me know and I could give it a try.

@larsgw
Copy link
Owner

larsgw commented Sep 20, 2017

It now works for me in babel (see the debugging process in #89). The fixes will be released in the next version (hopefully this week, otherwise in two weeks, as I can't do anything next week).

The next version changes a lot of @access protected APIs such as Cite.parse.input.chain() and basically any Cite.parse.*() function. If you use those, I'm glad to help with migrating (if necessary).

@apurde
Copy link

apurde commented Nov 23, 2017

Any update here? This bug currently prevents me from using it in my project.

@larsgw
Copy link
Owner

larsgw commented Nov 23, 2017

Sorry, I'll try to release as soon as I can.

@larsgw
Copy link
Owner

larsgw commented Nov 24, 2017

I'm having some trouble with browserify/babelify (not sure what's the problem) compiling the test suite, so I don't think I can release right now, but here's the regular build files (v0.3.4). (I haven't been able to test them myself in IE yet)

@apurde
Copy link

apurde commented Nov 24, 2017

Wow! That was fast. The provided version works on IE 11. Thank you so much.
Andreas

@larsgw
Copy link
Owner

larsgw commented Nov 26, 2017

I just saw https://bundle.run which seems pretty cool (it somehow automatically has a bundled version ready), so https://bundle.run/citation-js@0.3.4 provides a bundled script that defines citationJs globally - I'm not sure about browser compatibility, as I can't test IE right now, but if it does, cool!

@larsgw larsgw added this to General bugs in Version 0.4 Dec 19, 2017
@larsgw
Copy link
Owner

larsgw commented Feb 3, 2018

I think I finally got things back under control. Does the demo (https://citation.js.org/demo/) and/or the tests (https://citation.js.org/test/) work for you? If they do, they're updated to the newest version (0.4.0-1), so you can download them from there (citation.js, citation.min.js). I'll update the archive soon as well.

Edit: It seems there are still some issues, I'm looking into them now.

Edit 2: Should work now. Updating archive shortly.

Version 0.4 automation moved this from General issues to Done Feb 5, 2018
larsgw added a commit that referenced this issue Feb 5, 2018
- Fix IE errors
- Update dependencies
- Update to Babel@7
- Fix build process

Fix #87, close #89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
No open projects
Version 0.4
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants