Open jefferyto opened 10 years ago
Until this is done, a workaround is to "touch" the element, i.e. assign to any property of the DOM object (it doesn't matter if the property value remains unchanged).
For example, if the elements that use the polyfill all <div class="bg">
, then this should cause an update:
$('div.bg').prop('class', 'bg');
$('div.bg').get(0).style.behavior = $('div.bg').get(0).style.behavior;
does the trick
Thanks @rubensayshi - as I said, a workaround is to assign any value (even the same value) to any property.
:+1:
Folks are using this with elements that are styled dynamically with JS (#31, https://github.com/louisremi/background-size-polyfill/issues/15#issuecomment-33117627, https://github.com/louisremi/background-size-polyfill/issues/32#issuecomment-33461611), so we need a way for site scripts to trigger an update after they're done styling.