This could be a performance benefit for (for know only) Blink-based browsers that wouldn't need to copy the entire textarea contents into an extra div, sync the changes and perform the highlighting on that element.
See
Example from https://olliewilliams.xyz/blog/opaquerange/:
const input = document.querySelector('input[type="text"]');
const startIndex = input.value.indexOf("example");
const myOpaqueRange = input.createValueRange(startIndex, startIndex + "example".length);
const greenHighlights = new Highlight(myOpaqueRange);
CSS.highlights.set("green", greenHighlights);
This could be a performance benefit for (for know only) Blink-based browsers that wouldn't need to copy the entire textarea contents into an extra div, sync the changes and perform the highlighting on that element.
See
Example from https://olliewilliams.xyz/blog/opaquerange/: