I'm trying to use this polyfill to allow me use flexbox in IE8 and 9, but I'm just getting errors.
I have version 1.0.6 included in my project, as the latest version doesn't work according to the issues.
I am then calling it using the following code in my site.js file:
function supportsFlexBox() {
var test = document.createElement('test');
test.style.display = 'flex';
return test.style.display === 'flex';
}
if (supportsFlexBox()) {
// Modern Flexbox is supported
} else {
flexibility(document.documentElement);
}
However, I am getting the following error in console on IE9:
Function expected
I have also tried using just the following code (without the wrapping if statement):
flexibility(document.documentElement);
But I get the following error in Chrome
flexibility is not a function
Has anyone used this polyfill and it working before, or able to help me get this working? I'm not sure if im calling the function incorrectly or if there is a bug in the polyfill itself.