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

Compatibility with older browsers? #18

Closed
joethephish opened this issue Jul 7, 2016 · 5 comments
Closed

Compatibility with older browsers? #18

joethephish opened this issue Jul 7, 2016 · 5 comments

Comments

@joethephish
Copy link
Contributor

I notice that you use a lot of the newer JavaScript features in inkjs, and was wondering whether we know what the impact of that might be, if users want to upload content onto the web?

I'm vaguely aware of Babel... I wonder if it would be possible / sensible to use it to compile a version of inkjs that's as compatible as possible?

I'm thinking specifically about inky's "Export for web" option that I've built and will be in the next release. It's going to export a simple web template that includes the iife version of inkjs, and I want to make sure that the result works in as many browsers as possible.

@y-lohse
Copy link
Owner

y-lohse commented Jul 7, 2016

That's a good point and I haven't investigated it much.

I've mostly stuck to "simple" es6 features, such as classes and arrow functions. Those have been supported in evergreen browser for a while now, so firefox / chrome / opera / edge should be fine.

The problem may be with safari 9 & under, and IE 11 & under. For those cases, babel should indeed do the trick. It's actually already used, but I don't think it has any effect. I'll look into that.

Here's handy chart for es6 feature support, just in case :-).

And great to hear that export for web is comming to inky!

@joethephish
Copy link
Contributor Author

joethephish commented Jul 8, 2016

Hrm. I released a new version of Inky today with the Export for web functionality. At the last minute I decided to try it on my phone (iOS, mobile safari), and it doesn't have support for the most basic of features that you mention: (arrow) => { functions }.

It was a shame that I had to add warning messages to the release mentioning that caveat. We should really work out how to translate these modern features into older JavaScript, since that's really cutting out a large portion of users... :-/

@y-lohse
Copy link
Owner

y-lohse commented Jul 9, 2016

No problem, I'm a bit busy at the moment but I will catch up with version 0.4 next week, and I'll have a look at properly using babel. Unless someone wants to give it a go before then :-)

y-lohse added a commit that referenced this issue Jul 10, 2016
y-lohse added a commit that referenced this issue Jul 10, 2016
@y-lohse
Copy link
Owner

y-lohse commented Jul 10, 2016

@joethephish I've published a new version with babel enabled, so things should now work on safari?

The only browser I have at hand that doesn't support these is IE11. It can now more or less run inkjs, though I found another error after doing the release. Let me know how it does for you :-)

y-lohse added a commit that referenced this issue Jul 10, 2016
@joethephish
Copy link
Contributor Author

Fantastic, works great - thanks! Will update Inky :-)

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