So the functionf(a,b) is getting binded and calling entire piece of code for every time an event is done like clicking of elements.the code is written in Javascript Extension.and condition is kept for URL contains "somestring in the url of a commerce page like PLP or PDP" example if i write something on page load console.log('load some random text') it is being called when the click is done though it is not written within the click event. the function is getting binded and called for every time an event happening in the page so are there any steps or soultion so that the function loads only once and events like click dosen't get any unecessary triggering of events.
... View more