Fixed so it uses `elm.style` when `elm.currentStyle` returns undefined.