摘要 |
In some embodiments, code can be encapsulated in an external behavior component for affecting the behavior of an element inserted into an HTML document. A reference can be attached to the element in the document to associate the element with the external behavior component. A renderer can parse the element in the HTML document and access the external component to modify a behavior of a page image. For example, the properties or location of a displayed element associated with the external behavior component may be changed on an event, the external behavior component can control user data input, or the external behavior component can draw on the page image. Multiple documents can reuse external behavior components, and an element can be associated with multiple external behavior components. The associations between elements and external behavior components may be maintained in cascading style sheets, inline with the elements, and in various formats.
|