40. var features = [];
('Promise' in window) || features.push('Promise');
('IntersectionObserver' in window) || features.push('IntersectionObserver');
('after' in Element.prototype) || features.push('Element.prototype.after');
Feature detection
42. cons
You need to track all features you are using
Scripts that are dynamically created and added
to the document are async by default
43. cons
You need to track all features you are using
Scripts that are dynamically created and added
to the document are async by default
Browser has to parse and execute script
which creates other script for polyfill.io
44. cons
You need to track all features you are using
Scripts that are dynamically created and added
to the document are async by default
Browser has to parse and execute script
which creates other script for polyfill.io
polyfill.io caching