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

Invalid property id in mavo.js #569

Closed
joyously opened this issue Feb 6, 2020 · 9 comments
Closed

Invalid property id in mavo.js #569

joyously opened this issue Feb 6, 2020 · 9 comments

Comments

@joyously
Copy link

joyously commented Feb 6, 2020

Back in January, I opened an issue showing a problem with a Mavo in SeaMonkey. See LeaVerou/markapp#60
More recently, I was going to work on my test site which has two Mavo tests and both were getting a JS error in Mavo, and I hadn't changed them at all since they were working.

Today, I wanted to start back into Mavo, but the Mavo demo pages were not working for me in SeaMonkey.
mavo-demo-not-working

There seems to have been a change in Mavo that works in Firefox, but not in SeaMonkey. Shouldn't this stuff work in most browsers? It was working before in SeaMonkey.

@joyously
Copy link
Author

joyously commented Feb 6, 2020

Looking at the code on line 8481, it says
...callback
so I think it's the ... that is the problem in SeaMonkey.

@LeaVerou
Copy link
Member

LeaVerou commented Feb 6, 2020

Are you on a recent version of SeaMonkey? Which rendering engine does it use?

If the problem is ..., I'm not sure we can refactor the entire Mavo codebase because SeaMonkey doesn't support ... yet.

Shouldn't this stuff work in most browsers?

Most, yes, but it's impossible to support all. As much as we would love to, there are tradeoffs. The market share of SeaMonkey is currently less than 0.01%, and it's difficult to find how much less. It's not even listed in StatCounter's CSV and is listed as 0.00% here, which is for 2018. For 2020, it's not even listed.

However, I notice you're using mavo.js. If the problem is indeed ES6, using mavo.es5.js should alleviate it.

@joyously
Copy link
Author

joyously commented Feb 6, 2020

OK, it's not about SeaMonkey itself, but older browsers in general.
And it's not really refactoring the entire Mavo codebase either, because it used to work in this same version of SeaMonkey. It's only recently that ... was added and it doesn't work. I didn't change anything on my end, for my tests, and the screenshot above is from your own demo site.
So are you saying that as a Mavo user, I have to use something like Modernizer to see which Mavo JS file to load? I never saw that in the documentation. I certainly can't predict what browser my visitors might use, and apparently you can't predict it either, since the demo loads mavo.js.

@LeaVerou
Copy link
Member

LeaVerou commented Feb 7, 2020

Nope, no conditional loading required. We recommend using mavo.es5.js for everyone if you need wider browser support that includes older/more obscure browsers. :)
I believe we've been using ... for a long time, pretty much once support for it reached a certain threshold, but perhaps not from the beginning.

I'm going to leave this issue open in case mavo.es5.js doesn't fix the problem, so we can debug further.

@joyously
Copy link
Author

joyously commented Feb 7, 2020

How would I use that in your demo? or on the markapp page?

@joyously
Copy link
Author

joyously commented Feb 8, 2020

I tried my local test with mavo.es5.js and it worked.
It seems to me that this is not a decision a Mavo user should have to make. The target market of Mavo is people that don't code, so it would make more sense if the file that they include does the test for compatibility and loads the appropriate main Mavo file. If not that, at least the error should be caught and a message about upgrading their browser could be output.
Otherwise, using Mavo on a site runs the risk of showing broken empty pages, like your demo site and markapp page. That's not a very good advertisement of Mavo.

@LeaVerou
Copy link
Member

Please note that many libraries only distribute a transpiled version, we provide users the option and make it very clear in the download page what the tradeoffs are.
Browsers that need mavo.es5.js ovr mavo.js today are fairly rare, around < 3% all together.

Thank you for your input. I'm going to go ahead and close this now, since your issue is resolved.

@joyously
Copy link
Author

I see your point, but my issue is still not resolved. I can't see the demo or the markapp page in my preferred browser.
Also, that download page has a bug when trying to choose a specific version (or that just my old browser?).

@joyously
Copy link
Author

joyously commented Feb 24, 2020

Just for completeness, this problem for me is the spread operator in object literals. It doesn't have as much support as other uses of the spread operator. https://www.caniuse.com/#feat=mdn-javascript_operators_spread_spread_in_object_literals

My SeaMonkey is equivalent to Firefox 52, and the chart shows support started in Firefox 55 and Chrome 60. That's not that long ago (2017).
Edit: I just noticed that the canIuse page says the feature is experimental and to use caution before using in production.

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