New API for on_change

issue4203
review8581002