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

Minimum browser versions? (i.e. minimum IE version?) #324

Closed
trusktr opened this issue Mar 19, 2017 · 11 comments
Closed

Minimum browser versions? (i.e. minimum IE version?) #324

trusktr opened this issue Mar 19, 2017 · 11 comments

Comments

@trusktr
Copy link
Member

trusktr commented Mar 19, 2017

Hi all, what are your thoughts on, f.e., supporting only IE11+?

This would allow us to use WeakMap for private properties on the Tween class, and then we can store public methods on the prototype.

@dalisoft
Copy link
Collaborator

dalisoft commented Mar 19, 2017

Minimum browser support still is important as some of peoples (including me) uses starts at (see below):

Currently in my country statistic for browser/device usage, that matters:

  • iOS9+ (superr)
  • Chrome 35+ (very nice)
  • Firefox 35+ (nice)
  • Android 4+ (good, *)
  • IE9+ (almost good, *)
* - WeakMap polyfill requires, but can be made via smaller size

@dalisoft
Copy link
Collaborator

Can you share idea for class? Maybe i am implement it in ES6 version. Thanks

@trusktr
Copy link
Member Author

trusktr commented Mar 19, 2017

@dalisoft I'll make a PR soon, so you can see what it looks like.

@trusktr
Copy link
Member Author

trusktr commented Mar 19, 2017

@dalisoft Alright, here's a PR: #325, all tests passing.

Instead of a private WeakMap and doing _(this).privateMember to access, we could just store things on this with the underscore convention and access like this._privateMember, but then the functionality is different in that the end user can access private variables if they aren't following conventions. But the underscore method would make this continue to work in older IE.

@trusktr
Copy link
Member Author

trusktr commented Mar 19, 2017

Oh, wait, Object.assign support starts in Edge. According to this, IE 11 has WeakMap: https://docs.microsoft.com/en-us/scripting/javascript/reference/weakmap-object-javascript

@trusktr
Copy link
Member Author

trusktr commented Mar 19, 2017

How do you feel about just using the underscore convention?

@trusktr
Copy link
Member Author

trusktr commented Mar 19, 2017

Here's another PR that uses the underscore convention: #326

@trusktr
Copy link
Member Author

trusktr commented Mar 19, 2017

There we go, removed Object.assign in both PRs, so the underscore-convention PR works in IE9.

@mikebolt
Copy link
Contributor

I am fine with the underscore convention for private variables.

@trusktr
Copy link
Member Author

trusktr commented Sep 16, 2017

Closing, let's eventually add a transpile step that can support older browsers.

@trusktr trusktr closed this as completed Sep 16, 2017
@trusktr
Copy link
Member Author

trusktr commented Apr 27, 2020

Hey ya'll! I'm circling back to this, and would like to make some improvements and also fix some long-standing bugs.

What are the oldest browsers we need to support nowadays?

(Personally I wish we could support Edge/Chrome/Firefox/Safari, and just drop IE). But maybe we can have a "legacy" build just for the ancient browsers anyways, like tween.ancient.js and tween.ancient.min.js for fun file naming.

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

3 participants