I am trying to retrieve JavaScript Static resource in Community lightning component to override the numbering from Unescaped html. But the data locker service is blocking the script.
Am trying to customize CSS numbering, so I have added Custom CSS to lightning component from Static resource.But the unescaped HTML is not catching <ol start="6"><ol>
instead of starting from 6,ordered list is starting from 1.
So I have written the below JS to override this to start from "6" but data locker service is blocking. How can I avoid this?
I want to display my ordered list in Lightning component similar to the fiddle below
https://jsfiddle.net/stv05gph/
var ol = document.querySelectorAll("ol");
for (i = 0; i <= ol.length - 1; i++) {
var index = parseInt(document.getElementsByTagName("ol")[i].getAttribute("start")) - 1;
if (!isNaN(index)) {
document.getElementsByTagName("ol")[i].style = "counter-reset:li " + index;
}
}