Open feeela opened 9 years ago
Thank for reporting. You’re right. If you have time, feel free to submit a Pull Request with a fix. Otherwise I’ll try to fix it as soon as possible.
If you are using webpack (it works also for AMD modules) you can use the expose-loader
to set the global variable:
require('expose?objectFit!object-fit/dist/polyfill.object-fit.js');
Any progress on this? I cannot seem to be able to load object-fit with requireJS. I am willing to spend some time coding a fix for it, but my knowledge of AMD is way too basic. If you could point me into some direction it would be great.
Ah, damn it. Had really no time in the past weeks. Actually I hope to fix this in the next week, ultimately the week after. Sorry about the hassle.
yeah, this would be great!
In
src/polyfill.getMatchedCSSRules.js
you are usingobjectfit
as a global variable, which is not set, if the polyfill is loaded via an AMD module loader.Code that throws the exception "ReferenceError: objectFit is not defined":
if (objectFit.disableCrossDomain == 'true')
Currently the polyfill is not usable when using an AMD loader…