Wednesday, September 15, 2021

Re: [ANN] Akasha: Typed Browser API version 0.24 released

Hi,

On Wed, Sep 15, 2021 at 6:27 PM Jens <jens.nehlmeier@gmail.com> wrote:
really interesting work, but don't you think something like feature detection should be handled by a dedicated library like Modernizr for example? You likely want to check for vendor prefixed support when you do feature detection.

It depends upon the actual feature detection that is taking place. All the akasha stuff does is check whether a property/function is present on an object. So mostly it allows you to replace something like:

if (Js.global().has("indexedDB")) { /* perform logic requiring indexDB */ }

with:

if (WindowGlobal.isIndexedDBSupported()) { /* perform logic requiring indexDB */ }

Largely Akasha assumes that browsers conform with the HTML Living document (or whatever it is called) or the underlying spec and only presents the prefixes that are declared as part of the living document. If you want to perform more complex feature detection and polyfills (i.e. assigning prefixed version to unprefixed property or adding polyfills or detecting non-code related features such as css properties) then going with a dedicated library is a better option. 

Mostly we have found that our needs are served with pretty simple feature detection but YMMV
 
--
Cheers,

Peter Donald

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/CACiKNc6Yrhv1E_oMKiP8TBzMHOhHkj%2BULXNnh98Sup8NmG5rMw%40mail.gmail.com.

No comments:

Post a Comment