Re: [csswg-drafts] [css-highlight-api] Is a HighlightPointerEvent type needed? (#7512)

I suspect that if you have multiple highlight ranges with different behavior that they should maybe be different highlight instances, in which case maybe `CSS.highlights` should support adding multiple highlight instances to a single named highlight, e.g. something like this:

```js
// Get array of Highlight instances for found text.
let results = findText(text);
CSS.highlights.clear("find-highlights");
for (result of results)
  CSS.highlights.add("find-highlights", result);
```

This way the developer can attach behavior based on the particular find result, which in some cases may be based on additional context gathered from around the result.

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7512#issuecomment-1202752510 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 2 August 2022 14:56:27 UTC