Closed kingo55 closed 4 years ago
@kingo55
DOMContentLoaded
is a good choice since it's now widely supported.
Agreed. This implementation seems redundant now given we exclude older browsers now for most of the active Mojito containers in the wild.
You're right @allmywant - it has very broad compatibility: https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event#Browser_compatibility
I don't think we specify target minimum browser support, but supporting down to IE 9 should cover most of our users. People are free to build out their own IE7/8 support if they really want to.
Do you want to take this issue @allmywant ?
@kingo55 Sure I will do.
addressed by #79
We use DOM Ready quite a bit, but this function has a lot of dead weight to support older versions of IE before DOMContentLoaded existed.
https://github.com/mint-metrics/mojito-js-delivery/blob/master/lib/mojito.js#L1085-L1185
How might we update this for a smaller codebase without needing to support older browsers?