About this question
Error ID: -270960303 This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read property 'style' of null] Failing descriptor: {c:CommunityBreakingNews}
Controller:
({ doInit : function(component, event, helper) { //var lWidth = window.innerWidth ; var lWidth = 400; window.setInterval($A.getCallback(function() { helper.handleScroll(component, event,lWidth); } ), 20); } })Helper:
({ handleScroll: function(component, event,lWidth) { var changeposition = component.get("v.scrollInterval"); var floatElement = document.getElementById('toScroll'); if(changeposition < lWidth xss=removed xss=removed floatElement.style.left = "0px" xss=removed>Style:
.THIS#scrollDIV{ border: 5px solid; border-radius: 6px; background: beige; height: 50px; margin: 5px; padding: 2px; }
What is the reason for getting and how to resolve this error” cannot read property 'style' of null”?