Re: [csswg-drafts] [css-highlight-api] maplike vs setlike (#5910)

In short:
* registering the same highlight multiple times under different names -> they share the priority, which is confusing as @sanketj explained about  -> switched from map to set
* registering a new highlight under an existing name could either replace the old one, or throw. throwing seems to allow for better detection of accidental collision between highlights. That said, we could change that.

Another alternative could be to switch back to a map, and do something if an already registered highlight gets registered again under a new name (throw? remove the older one?). Maybe you can help me think through something here: can we reliably test object equality in JS?

Or maybe we switch back to map, and allow duplicate entries (with at most, a warning in the console), and just advise authors not to do that…

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


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

Received on Thursday, 25 March 2021 07:20:21 UTC