1. A computer program product, tangibly embodied in an information carrier, the computer program product comprising instructions operable to cause data processing apparatus to perform operations comprising: identifying a change of a user interface (UI) element that references a node of a document object model (DOM) hierarchy; determining whether the change of the UI element can be applied to the DOM hierarchy by using an update function; if the change can be applied by using the update function, finding in the DOM hierarchy the node that is referenced by the UI element and modifying at least one attribute related to the node according to the change by using the update function; and else, setting a dirty flag.