@dimitri320 wrote:
I’m trying to manipulate the DOM dynamically from my TS (JS) by using the following line of code:
document.getElementsByTagName("ion-backdrop")When outputting this to the console, it writes “
HTMLCollection []”.My problem is that beyond this point, nothing appears to work. I’ve tried the following methods, and all don’t work.
document.getElementsByTagName("ion-backdrop").[0].styles.background("#000") document.getElementsByTagName("ion-backdrop")[0]. setAttribute("background", #000)Can anyone suggest how can I dynamically change the background? FYI, I don’t have access to the HTML (this is a native Ionic component).
Posts: 2
Participants: 2