[SalesForce] document.getElementById(‘someid’) not working with locker service

2 days back when we enabled locker service document.getElementById('someid') was working. All of a sudden it stopped working and now gives undefined. i can see the div whose property i need to modify from browser F12. Please help.

Best Answer

Try doing the same in the afterRender function in the renderer file.

({
afterRender: function(component, helper) {
    this.superAfterRender();
    //YOUR CODE
}

})