[csswg-drafts] [css-highlight-api]: Highlight constructor should accept 0 or more AbstractRanges instead of an optional sequence (#4620)

sanketj has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-highlight-api]: Highlight constructor should accept 0 or more AbstractRanges instead of an optional sequence ==
This can be achieved with the `...` syntax, like append/prepend use here: https://dom.spec.whatwg.org/#parentnode. If more than one highlight need to be added, they can be specified with additional parameters. This will avoid having to create a sequence when creating a Highlight with one range object.
So we would be able to do:
```
    let highlightRange = new Range();
    let highlight = new Highlight('example-highlight', **highlightRange**);
    CSS.highlights.add(highlight);
```
instead of:
```
    let highlightRange = new Range();
    let highlight = new Highlight('example-highlight', **[highlightRange]**);
    CSS.highlights.add(highlight);
```

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4620 using your GitHub account

Received on Friday, 20 December 2019 08:09:37 UTC