nuxodin/ie11CustomProperties

Feature Request: Callback when done

dotherightthing opened this issue · 1 comments

In IE11, use of this polyfill adds a noticeable lag before the page becomes fully interactive (v4.1.0).

I've mitigated this by post-processing my CSS with postcss-custom-properties. This allows the page to render the core styles right away, with inline overrides being applied once the ie11CustomProperties polyfill has finished doing its thing.

But this mitigation only helps with the perceived loading time. The user still has to wait for the ie11CustomProperties polyfill to finish before the page becomes interactive.

Adding a callback would allow me to display a message while setup is ongoing.

Thanks for the feedback
Since dynamically inserted styles are also taken into account afterwards, you cannot simply make a callback.
Furthermore, I no longer extend the script.