Is web-animations-api abandoned? - javascript

I've been interested in implementing animations in JavaScript recently, and I've been interested in waapi.
So I studied the relevant parts and there were too many problems. First, there was virtually no support in the browser, and second, development of the polyfill library was stopped.
I wonder if this api is actually going to be deprecated.

The API is supported in Firefox and Chrome. However, only a portion of the API is available in the current release versions of these browsers.
The remainder of the API is available in the Firefox Nightly / Chrome Canary builds of these browsers although you may need to enable experimental Web platform features in Chrome to make use of them. The Firefox implementation is nearly 100% complete and is currently waiting for Chrome and Safari implementations to reach parity before shipping.
Support in Safari is good but currently only available in Technology Preview builds. The release date is unclear as Safari do not always announce their future release plans.
As you note, however, the polyfill is not actively maintained since native support in browsers has progressed so far now. For many cases, it may be acceptable to serve older browsers that do not support Web Animations the un-animated version that would also be served to users who have indicated they would prefer reduced motion.

Related

How to interpret caniuse website information?

I wanted to check what is the support of fetch API in browser so I opened caniuse.com to get this information.
Looking at Chrome browser I see this feature is available since version 42 (which released in april 2015), but looking at Chrome For Android and I see only version 84.
Does this mean that fetch API is available only in the latest version in Chrome For Android? That doesn't seem logical to me so what is the correct way to interpret this (and other) tables on caniuse.com website?
Caniuse hides browser versions with less than 0.5% percent of users, which you can check and tweak by clicking on settings. That spawns a sidebar. You can lower this number down as fast as 0.01%, but even then Chrome for Android only shows version 84. That is because so many people have automatic updates turned on, that at least for mobile browsers, it's much more likely that people are on the latest version. For desktop browsers, people have to deal with company guidelines, have to go through the trouble of clicking "update", etc.
So in conclusion, if a version is not shown, even at 0.01% in the settings, consider it non-existing.
What happened here is that there is no specific data for Chrome for Android, so caniuse defaults to saying that if it's supported in the latest desktop version, then it's also supported in the latest Android version. Nobody has taken the time to specifically test Chrome for Android.
In general, caniuse is a human-curated list and won't always be accurate. You'll be best served by tracking down more primary sources. For example, the Fetch API was enabled in Chromium in 2015-02, with no platform-specific exemptions.

Looking for a Modernizr feature set to target specific minimum browser requirements

I'm currently upgrading a website for a customer. Current website uses a Modernizr feature set to target specific browsers that we can validate works with the wide variety of customers.
Current browser minimum requirements for this website are:
IE 10
Firefox 19
Chrome 32
Safari 9
iOS 8
Android 4.4 (I don't bother about all the differents quirks of some Blink implementations)
Since the website is targeted for an older audience which has not a lot of IT knowledge, I am considering to still support IE11 for those who still stay on Windows 7, and Firefox 52 for those on XP.
So, new browser minimum requirements would be something like
IE 11
Edge all versions
Firefox 52+
Chrome 69+
iOS 12+
Android 5+
I was searching for a set of features that are known to work on all these conditions so I can set a Modernizr feature set script to redirect users to a fallsafe version of the website if needed.
I've seen this post: Detecting IE11 using CSS Capability/Feature Detection, but it only targets IE11 (it's a great start tho). I also took a look at Caniuse but this can be kind of confusing.
My current idea is to set a feature set containing ES5 full support and ES6 minimal support, but I want to be sure to nake it OK to not have false positives on user's browsers. I also considered detecting flexbox support, since I use it.
So, considering this, would you have an idea of a feature set I could use for that specific set of browser requirements?
Edit: I wonder if there is a tool around that you can specify some browser features you want and that automatically gets you minimal browser requirements. I don't know why but I have a doubt this would probably exists somewhere.
Regards.

Using Angular 2 with older browsers thanks to TypeScript?

Since the Angular 2 team is using TypeScript for it's build, would it be a feasible assumption that they could compile a version of Angular 2 that would work on older browsers?
Edit 2:
It appears the Angular team has decided to support some non evergreen browsers. Per Brad Green (of the Angular team): What browsers versions will Angular 2 support? There's a new build widget with some hints on https://github.com/angular/angular
Currently, the Readme shows IE9 and up.
Angular 2 will only support modern browsers:
Modern browsers means the set of browsers known as ‘evergreen’ or
always automatically updated to the latest version. Building for
these browsers let us drop many hacks and workarounds that make
AngularJS harder to use and develop on than it needs to be.
The set currently includes Chrome, FireFox, Opera, Safari, and
IE10/11. On mobile, we’ll support something close to the list of
Chrome on Android, iOS 6+, Windows Phone 8+ and Firefox mobile. We’re
looking into supporting older versions of Android, but the jury is
still out.
http://angularjs.blogspot.com/2014/03/angular-20.html
Edit: To address your comment, no Typescript is not the limiting factor for Angular 2's lack of support for non-modern browsers (nor going to provide any magical support). Typescript can transpile to ES3, so if your target browser supports ES3, you can use Typescript. Conversely, Angular 2 will gain nothing wrt supporting legacy browsers by using TypeScript.

How to check the last available version of Chrome and Firefox using C# or JavaScript?

One of the requirements of one of my clients is to show a message to a user that's using an older version of Firefox, Chrome, IE or Safari. For the last two it's easy (IE 9+ and Safari 5+). But for Firefox and Chrome, the requirement is that the site supports the current and the previous version of each browser.
To get the clients browser and version is quite simple, but I need to know what is the last version of each browser. Is there any way of doing that?
Well, technically, all you need is a place that keeps track of what the latest version of each browser (Ideally with a web service).
A quick Googling I was able to find: http://www.webdevelopersnotes.com/articles/latest-browser-versions.php
It's not a web service, but you could simply parse that HTML and get the latest version of each browser. Alternatively, you could keep track yourself and manually update this information in your database.
You should only ever have to worry about IE when it comes to version enforcement. Exception being, of course, if you need a specific API that's just not available in previous versions of Chrome/Firefox, but in that case you'd look and enforce the API, not the browser version. Adding to that, if Chrome/Firefox don't have an API, chances are even the most bleeding edge version of IE won't either, so the point is moot. The fact is Firefox and Chrome, and in part Safari, are far ahead of IE when it comes to browser hosted capabilities that trying to enforce specific versions of the former would likely be a lot of wasted time and effort to yield nothing substantial.
The best I could find was this. It has an export option that allows to export in JSON, XML...
I would strongly suggest that you don't check the browser version, instead try doing feature detection using, say, Modernizr.
What features of your client's site depends on specific versions of each browser? If you use Modernizr you could perform a check on a feature, say some video stuff, and if the current browser does not support that feature, then display a message to the user suggesting they upgrade their browser.
Detecting browser versions via Javascript is very flakey at best.
The only reason I'd say you need this kind of verification is because your webpage has features only available to latest browsers. Instead of relying on version numbers, I suggest learning Modernizr.js for your website.
http://modernizr.com/
It can detect particular html5/css3 features individually.

Firefox addon compatibilty with version 11

I made an addon for Firefox and it works with the latest version. My problem is that I want it to work with all versions of Firefox. How can I do this?
Info:
I used the Add-on SDK to make the extension.
I use jQuery too in my extension, could it come form here?
Add-on SDK 1.14 (the current release) marks add-ons compatible with Firefox 19 and disallows installation in older Firefox versions. If you don't like that you have several options:
Edit app-extension/install.rdf in your Add-on SDK install and set minVersion to something other than Firefox 19. If your extension is simple you might even get away with that and your extension will actually work in older Firefox versions, maybe even in Firefox 4 (definitely not below that however, restartless extensions were introduced in Firefox 4). This is obviously not supported and verifying that everything really works correctly (e.g. no memory leaks) will be close to impossible.
You can get an old version of the Add-on SDK. You will not get any of the improvements in the newer Add-on SDK versions but you get support for old Firefox versions. You will still need an Add-on SDK version that's compatible to at least Firefox 10 however, otherwise your add-ons won't install in current Firefox versions (Firefox 10 is where the "compatible by default" switch was flipped). Also, regardless of compatibility flags - while your extension might work correctly in current Firefox versions, it's just as likely that it won't.
You can drop the Add-on SDK and just create a classic extension. Then you can set the compatibility boundaries to anything you like. Taking care of backwards compatibility will also be your responsibility however - and depending on what range of Firefox versions you want to support this is a very non-trivial task.
The main question is however: why do you want that? The current Extended Support Release is Firefox 18, so no version below Firefox 18 is supported by Mozilla. There are of course a few users on outdated Firefox versions for some reason but people who don't update also rarely go install new extensions. So, do you really want to spend tons of time making your extension work in Firefox 1.0 (release 2004)? How about Firefox 4 (released 2011)? How much effort do you want to invest into staying compatible with old versions when there are tons of addon-relevant changes in each single release?
You should read the addon compatibility page on the sdk documentation.
https://addons.mozilla.org/en-US/developers/docs/sdk/1.14/dev-guide/guides/firefox-compatibility.html
Did you simply try to change the minVersion field in your install.rdf file?

Categories

Resources