The Safely Composable DOM

Achim D. Brucker und Michael Herzberg

Cover for brucker.ea:afp-core-sc-dom:2020.In this AFP entry, we formalize the core of the Safely Composable Document Object Model (SC DOM). The SC DOM improve the standard 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.

Schlüsselwörter:
Kategorien: , ,
Dokumente: (Artikel als PDF Datei) (Outline)

QR Code for brucker.ea:afp-core-sc-dom:2020.Bitte zitieren sie diesen Artikel wie folgt:
Achim D. Brucker und Michael Herzberg. The Safely Composable DOM. In Archive of Formal Proofs, 2020. http://www.isa-afp.org/entries/Core_SC_DOM.html, Formal proof development
(Artikel als PDF Datei) (Outline) (BibTeX) (Endnote) (RIS) (Word) (Share article on LinkedIn. Share article on CiteULike.)

BibTeX
@Article{ brucker.ea:afp-core-sc-dom:2020,
abstract = {In this AFP entry, we formalize the core of the Safely Composable Document Object Model (SC DOM). The SC DOM improve the standard 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.},
author = {Achim D. Brucker and Michael Herzberg},
date = {2020-09-28},
file = {https://www.brucker.ch/bibliography/download/2020/brucker.ea-afp-core-sc-dom-outline-2020.pdf},
filelabel = {Outline},
issn = {2150-914x},
journal = {Archive of Formal Proofs},
month = {sep},
note = {\url{http://www.isa-afp.org/entries/Core_SC_DOM.html}, Formal proof development},
pdf = {https://www.brucker.ch/bibliography/download/2020/brucker.ea-afp-core-sc-dom-2020.pdf},
title = {The Safely Composable {DOM}},
url = {https://www.brucker.ch/bibliography/abstract/brucker.ea-afp-core-sc-dom-2020},
year = {2020},
}