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

Can't find variable: mdoc_js_run0 on iOS #577

Closed
armanbilge opened this issue Oct 25, 2021 · 7 comments
Closed

Can't find variable: mdoc_js_run0 on iOS #577

armanbilge opened this issue Oct 25, 2021 · 7 comments

Comments

@armanbilge
Copy link
Contributor

Possibly related to the maximum call stack size size exceeded error :)

I get this when visiting https://armanbilge.github.io/http4s-dom from iOS Safari and remotely connecting the web inspector from macOS Safari.

image

@armanbilge
Copy link
Contributor Author

armanbilge commented Oct 28, 2021

Closing because I think this a problem with the site-generator, not mdoc.

@armanbilge
Copy link
Contributor Author

Reopening. I fixed the site generator problem but this issue persists 😕

@olafurpg
Copy link
Member

olafurpg commented Nov 2, 2021

Thank you for reporting!

This error seems to come from this JS file https://github.com/scalameta/mdoc/blob/791a78ad620f85f38a3cef6a5a605662678930b4/mdoc-js/src/main/resources/mdoc.js

I'm not so familiar with the differences between iOS Safari and desktop Firefox/Chrome to suggest any fixes 🤷

@olafurpg
Copy link
Member

olafurpg commented Nov 2, 2021

If eval doesn't work reliably in all browsers, we might be able to register the function references in some global array around here

.foreach(runs)(code.println)

@armanbilge
Copy link
Contributor Author

Thanks for the response. Actually I suspect the problem comes from the README.md.js file, where mdoc_js_run0 is defined:
https://http4s.github.io/http4s-dom/README.md.js

I put some more detailed analysis here:

But tl;dr seeing that README.md.js is mostly full of user-generated code and assuming that if Scala.js/mdoc.js didn't work in iOS this would have been reported before, I suspect this is a problem on our end.

@olafurpg
Copy link
Member

olafurpg commented Nov 2, 2021

didn't work in iOS this would have been reported before

I wouldn’t take that for granted.

@armanbilge
Copy link
Contributor Author

Fair enough, but your Scala.js demo page seems to work anyway :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants