RE: conventions for prollyfills

> 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", ... 		 	   		  

Received on Wednesday, 25 September 2013 19:52:38 UTC