02-07-2018 01:06 PM
I have scenario, where the 'utag.js' is loaded on the page.
The link handler code is getting applied to all links on the page, except Shadow DOM components loaded on the page.
How do I bind the link handler for the links loaded on the shadow DOM?
Solved! Go to Solution.
First question, "what" is adding the link handler onto the DOM for you?
All of Tealium's JS code for link handling, and for that matter, almost all the vendor code I've seen, doesn't cope with shadow DOMs.
The way I would attach a handler to these would be to:
use var links = showdowRoot.querySelector("a");to get a list of links to apply an event listener too.