I am looking for a way to detect when a flag value has been changed. addEventListener()or jQuery on()works mostly, but changes made this way will not be detected:
<input type="checkbox" id="testCheckbox">
<script type="text/javascript">
document.getElementById("testCheckbox").checked = true;
</script>
Is there any way to detect this change? Even what works only in the latest browsers would be great.
Edit: To be clear, I want to detect changes made by any script on the page. I do not necessarily control them, so I cannot initiate the event myself.
mikel source
share