The Safely Composable DOM (Q7361660)

From MaRDI portal

!

This is the item page for this Wikibase entity, intended for internal use and editing purposes. Please use the normal view instead:

AFP entry Core_SC_DOM
Language Label Description Also known as
default for all languages
No label defined
    English
    The Safely Composable DOM
    AFP entry Core_SC_DOM

      Statements

      28 September 2020
      0 references
      Achim D. Brucker
      0 references
      Michael Herzberg
      0 references
      The Safely Composable DOM (English)
      0 references
      In this AFP entry, we formalize the core of the Safely Composable Document Object Model (SC DOM). The SC DOM improve the standard DOM (as formalized in the AFP entry “Core DOM”) by strengthening the tree boundaries set by shadow roots: in the SC DOM, the shadow root is a sub-class of the document class (instead of a base class). This modifications also results in changes to some API methods (e.g., getOwnerDocument) to return the nearest shadow root rather than the document root. As a result, many API methods that, when called on a node inside a shadow tree, would previously “break out” and return or modify nodes that are possibly outside the shadow tree, now stay within its boundaries. This change in behavior makes programs that operate on shadow trees more predictable for the developer and allows them to make more assumptions about other code accessing the DOM.
      0 references