Closed ghost closed 10 years ago
Hi, thanks for raising this feature-request. Could you point out what benefit is has and if the performance will not be affected by this change? Thank you. :)
The benefit is that it would work if you load the plugin asynchronously (e.g. with Require.js). The performance should not be an issue, since if you omit this part, the plugin does not perform at all (when being loaded after window load). I hope this makes sense.
By the way, I checked the other object fit polyfills and this is by far the best (excerpt for this minor issue).
Excellent suggestion. I just updated the library accordingly: https://github.com/anselmh/object-fit/releases
Awesome! Thanks a lot.
With a simple check of
document.readyState === 'complete'
, the plugin could work even after the page is loaded.