polyfill icon indicating copy to clipboard operation
polyfill copied to clipboard

Is there a way to have a callback or event for after all pollyfills have performed doMatched?

Open OpherV opened this issue 12 years ago • 3 comments

This will be useful for polyfills that rely on each other.

OpherV avatar Sep 02 '13 14:09 OpherV

Short answer, no. Not at the moment.

doMatched runs at the very beginning, but it also runs any time the media changes and new styles are matched, so it'd be a bit tricky to accomplish this the way the library is now. There'd have to be some sort of distinction between the initial run and subsequent runs.

philipwalton avatar Sep 03 '13 15:09 philipwalton

Oh too bad I'm writing an alternative to flexie, and was really hoping to use polyfill.js

The problem is that with the flex box model every display: flex container needs to be aware of its children with flex property, and without running a hook after all parsing was done, there is no proper way to connect containers with children.

Is that something you're planning on adding?

OpherV avatar Sep 03 '13 17:09 OpherV

To be honest, I haven't been able to work on library recently, and I don't know when I'll get a chance again. So, if you're not willing to contribute to the library, it might not be mature enough at the moment for what you're looking for. Sorry.

That being said, I do agree that this is a good feature to add, so I'll leave this issue open as a reminder to add it later.

philipwalton avatar Sep 04 '13 15:09 philipwalton