Modeling and reasoning about DOM events

  • Authors:
  • Benjamin S. Lerner;Matthew J. Carroll;Dan P. Kimmel;Hannah Quay-De La Vallee;Shriram Krishnamurthi

  • Affiliations:
  • Brown University;Brown University;Brown University;Brown University;Brown University

  • Venue:
  • WebApps'12 Proceedings of the 3rd USENIX conference on Web Application Development
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Web applications are fundamentally reactive. Code in a web page runs in reaction to events, which are triggered either by external stimuli or by other events. The DOM, which specifies these behaviors, is therefore central to the behavior of web applications. We define the first formal model of event behavior in the DOM, with high fidelity to the DOM specification. Our model is concise and executable, and can therefore be used for testing and verification. We have applied it in several settings: to establish some intended meta-properties of the DOM, as an oracle for testing the behavior of browsers (where it found real errors), to demonstrate unwanted interactions between extensions and validate corrections to them, and to examine the impact of a web sandbox. The model composes easily with models of other web components, as a step toward full formal modeling of the web.