Email or username:

Password:

Forgot your password?
Top-level
Bramus

@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.

1 comment
tbeseda

@bramus good point about performance.
I have written a couple highlighters and one tried to be semantic about the added elements. A lot of work for minimal pay off.
I’m not opposed to the new feature, just wish there was a way without the script.
Cool to see the progress.

Go Up