javascript - How does a browser know that an element has changed without a setter method, but just by assignment with '='? -


how possible, browser can refresh input element (or other element), when assign value without setter method, normal assignment:

<script type="text/javascript">   document.getelementbyid("element_id").value = 'value'; </script> 

is there native event, or javascript event? expect like:

function setattribute(value) {   model.value = ...   fireevent(); } 

but can set attribute without setter.

so "event" fired (hidden somewhere in assignment '=') browser knows refresh needed?

greetings

the js engine free detect wants. simple if (dest instanceof domelement) { special handling } or extremely complex process. it's simple assignment in js land. in implementation land, can wants long end effect correct.

in other words, looks simple assignment. behind scenes, more.


Comments