RE: conventions for prollyfills

On Sep 25, 2013 12:52 PM, "François REMY" <francois.remy.dev@outlook.com>
wrote:
>
> > I think there's no such thing as real interoperability between
> > different modules, even if exposing similar APIs.
>
> True. This has to be done at a granular level. Examples include
"querySelectorLive" which whould fire events when an element starts or stop
to match a selector. There may be two very different implementations of the
same function that provide the same external interface and contracts, but
may fit two different kinds of DOM.
>
> You may want, as a polyfill author using "querySelectorLive", to give the
opportunity to the site author to choose the implementation that fits its
website needs.
>
> Of course I do not recommend using that pattern for <any-complex-thing>
here, it's more when it comes to small API that are mostly self-contained.
Examples that come to my mind: "setImmediate", "requestAnimationFrame", ...

right..even more particularly when they are very mature/close.  promises
even has tests

Received on Wednesday, 25 September 2013 20:09:41 UTC