DecorationSet
A collection of decorations, organized in such a way that the drawing algorithm can efficiently use and compare them. This is a persistent data structure—it is not modified, updates create a new value.
§Implements
§Properties
§Methods
Add the given array of decorations to the ones in the set,
producing a new set. Consumes the decorations
array. Needs
access to the current document to create the appropriate tree
structure.
Find all decorations in this set which touch the given range
(including decorations that start or end directly at the
boundaries) and match the given predicate on their spec. When
start
and end
are omitted, all decorations in the set are
considered. When predicate
isn't given, all decorations are
assumed to match.
Map the set of decorations in response to a change in the document.
Create a new set that contains the decorations in this set, minus the ones in the given array.
§Static Properties
The empty set of decorations.