It changes 3 things:
- registering handlers from within the config object
- register handlers as bare objects (as long as the property name matches a hook)
- register a config object after a polyfill script
Config is now scoped to the instance of the Polyfill, and it is taken in account when
DOMContentReady is fired.
Config is simpler because we don't have to use 2 different concepts (config object, and registering classes).
Before we would have to use 3 scripts (config object, script src, then Handler classes with manual preview call).
I did some extra stuff:
- removed explicit dependency to
lodashbecause it's not imported by
- moved tests to the
srcfolder so as they mimic the structure of the
Let me know if you have questions, or would like me to change something.
This work has been done during Les Rencontres de Lure, with @JulieBlanc sitting next to me!