1. A system for manipulating a document object model, the system comprising: a memory for storing instructions; a processor for executing the instructions stored in the memory, the executed instructions configuring the processor and memory to provide: a viewer for creating, manipulating and displaying a document object model from a received markup file describing a user interface including an instance of at least one behavior element, the viewer including: a collection of predefined document object model behavior elements, the collection of predefined behavior elements including the at least one behavior element of the received markup file, each behavior element comprising: a namespace for identifying the behavior element; an event attribute for associating the behavior element to an event monitored by the viewer; and other attributes for describing features of the behavior element; and a collection of scripts for performing actions associated with the collection of behavior elements, each script of the collection of scripts being associated with a behavior element of the collection of behavior elements through the event attribute of the behavior element and manipulating the document object model in a predefined manner according to the other attributes of the behavior element when the viewer detects the occurrence of the event associated with the behavior element.