Message from JavaScript discussions

July 2017

— What I read says it is basically a document fragment


"The Range interface represents a fragment of a document that can contain nodes and parts of text nodes."

— I suppose it is a "view" rather than a container, maybe

— Huh, i see

— NodeList is a view of the DOM and doesn't "contain" anything... so I wonder what Range really is

— Huh

— Weird

— Dom spec might be worth a read on this then

— Yep

— Hm. "The Range() constructor ought to be used instead."

— Per the DOM spec

— So it becomes new Range().createContextualFragment(sourceHtml);