@bramus Slick! but if there's no markup it's not really a semantic document anymore, right? not standalone anyway.
To me, “overloading” the DOM with meaningful elements to denote information about a piece of text is the least concerning thing when it comes to creating elements these days.
Also, was there consideration from ECMA about using `Range`? seems like that might be more useful as a non-browser primitive.
@tbeseda The way these highlighters typically work is by wrapping things in spans with a bunch of classes. These spans with classes add no semantics at all.
Also, sometimes - e.g. on large files with many tokens - they can cause performance issues because of the larger DOM tree.
Don't have info on how this API came to be, so don't know if and when TC-39 was consulted.