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

The CSS Working Group just discussed `Is HighlightPointerEvent needed?`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: Is HighlightPointerEvent needed?<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/7512<br>
&lt;fantasai> dandclark: if the solution we go with here involves highlight being an event target<br>
&lt;fantasai> dandclark: which either way I think will be the case<br>
&lt;fantasai> dandclark: who do I know which range was targetted?<br>
&lt;fantasai> dandclark: e.g. I'm a spell checker, but got a click, but which range was clicked?<br>
&lt;fantasai> dandclark: multiple ways to fix<br>
&lt;fantasai> dandclark: original solution maybe doesn't make sense, but if we do have some kind of intersects API then maybe that answers the question<br>
&lt;fantasai> dandclark: if we're re-using the existing pointer events, then [missed]<br>
&lt;flackr> q+<br>
&lt;fantasai> dandclark: call some kind of API, what were my intersection ranges?<br>
&lt;fantasai> dandclark: I need to know which ranges and which highlight<br>
&lt;fantasai> dandclark: perhaps API could be just onHighlight? similar to what ?? was proposing<br>
&lt;fantasai> dandclark: I add intersects() function to Highlight, it takes x,y and it returns a list of ranges in the highlight<br>
&lt;fantasai> dandclark: maybe that's the simplest<br>
&lt;fantasai> dandclark: highlight could potentially have several overlapping on the same text<br>
&lt;fantasai> dandclark: does that sound reasonable?<br>
&lt;fantasai> emilio: yes...<br>
&lt;GameMaker_> q+<br>
&lt;fantasai> emilio: given we already have a hit testing function that gives you list of highlights, maybe also takes ranges<br>
&lt;fantasai> emilio: I think this is related to previous issue<br>
&lt;fantasai> emilio: either way, if we go through event listener path or dom event thing, or the thing we were discussing<br>
&lt;fantasai> emilio: I'd rather resolve that first, even if it's not the final solution<br>
&lt;fantasai> emilio: maybe instead of sequence of highlights we need to return sequence of highlights and ranges<br>
&lt;fantasai> dandclark: sounds good, just want to make sure the problem is on the radar<br>
&lt;fantasai> flackr: I don't think we should have a specific event type, because I think ?????<br>
&lt;fantasai> flackr: prefer to have event that bubbles up. You dispatch to specific range, and then on the highlight you can check for which range<br>
&lt;fantasai> emilio: but target would be the DOM eleent<br>
&lt;dbaron> s/?????/we will want to target multiple types of events at highlights/<br>
&lt;fantasai> flackr: right, but ...<br>
&lt;dbaron> (I think)<br>
&lt;fantasai> emilio: but unsure about event target<br>
&lt;fantasai> emilio: [missed]<br>
&lt;fantasai> emilio: we may need to figure out a way... obviously, if we provide the API so that if we ? both highlights and ranges, the page could put the ranges property and expand all of the object<br>
&lt;fantasai> emilio: it's worth thinking about, but depends on other issues<br>
&lt;astearns> ack flackr<br>
&lt;astearns> ack GameMaker_<br>
&lt;fantasai> GameMaker_: I just want to make sure that when we're talking about ranges that highlights are done in abstract ranges, so keep that in mind<br>
&lt;fantasai> GameMaker_: make sure we remember they're AbstractRanges<br>
&lt;fantasai> emilio: you can build highlights with StaticRange and ??<br>
&lt;fantasai> GameMaker_: yeah, AbstractRange can be either<br>
&lt;fantasai> emilio: right<br>
&lt;dandclark> q?<br>
&lt;fantasai> astearns: anything else on this issue?<br>
&lt;fantasai> astearns: OK, we'll come back to both of these relatively soon<br>
&lt;dbaron> s/StaticRange and ??/StaticRange or Range/<br>
</details>


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


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

Received on Monday, 1 August 2022 19:06:18 UTC