In JavaScript, I need to detect when the value of a certain select element has changed for any reason, including programmatically.
The onchange event is only fired when the user changes the selected value manually, not when other JavaScript changes the value programmatically.
This is a website with a variety of plugin components that we don't want to hack up (and in some cases can't hack up, since the code resides on other sites). So triggering the change event myself whenever there is a programmatic change isn't an option. I need to actually monitor the select, listen to it, for a change in value.
Is this possible? I haven't found a way.
Is there perhaps some library I can use to frequently poll the value looking for change? Or some other way?