You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be achieved with the ... syntax, like append/prepend use here: https://dom.spec.whatwg.org/#parentnode. If more than one highlight needs 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);
The text was updated successfully, but these errors were encountered:
This can be achieved with the
...
syntax, like append/prepend use here: https://dom.spec.whatwg.org/#parentnode. If more than one highlight needs 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:
instead of:
The text was updated successfully, but these errors were encountered: