I do not have any option to update the javascripts loaded into the page by other applications. But I need to know the "flagDisplaySpecialButton" parameter value at runtime (debugging purpose only) when "showSpecialButton" function is called.
Is there any way to watch this variable while debugging in chrome browser?
async function showSpecialButton(flagDisplaySpecialButton) {
const specialButton = document.getElementById('specialButtonWrapper');
const isSpecialButtonEligible = true; //await getSpecialButtonEligibility();
if (specialButton) {
if (isSpecialButtonEligible && flagDisplaySpecialButton) {
specialButton.hidden = false;
return true;
}
specialButton.hidden = true;
return false;
}
return false;
}
showSpecialButton(true); //called from different javascript files
<div id="specialButtonWrapper" hidden>
<button id="specialButton">Special Button</button>
</div>