question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supporting an array of selectors

See original GitHub issue

I’ve the need to create a tour that highlight a subset of DOM sibling elements.

Something like: driver.highlight('.foo, .bar');

I can’t use a parent node because the scope is to not highlight other siblings.

The expected final result should be probably to highlight the minimal rect that contains all of the elements.

Do you think that this new feature would be difficult to be implemented?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
ineenthocommented, Apr 18, 2018

+1 This is a feature I’m looking for to. My use case is to highlight several menu items that are next to each other.

I’d say the expected api would be driver.highlight([className | element, className | element...]).

0reactions
mclnglcommented, May 25, 2021

it’s not optimal but I managed to get around this by doing like so

tags.forEach((_, index) => {
      const driver = new Driver({
        allowClose: false,
        className: styles.Driver,
        opacity: 1,
        stageBackground: 'transparent'
      });
      driver.highlight(
        `.${styles.Filters} > .${styles.Tag}:nth-child(${index + 1})`
      );
  });
Read more comments on GitHub >

github_iconTop Results From Across the Web

Selector Support That Returns An Array Of Selectors Rather ...
A way to query using a CSS locator that will return an array of Selector items. What alternatives have you considered? I used...
Read more >
Selector array with OR selectors - ProcessWire
Hello, I'm trying to build a selector array to work with an OR operator. I need all pages where the datetime field ("date_pub_end")...
Read more >
array-selector – API Reference - Polymer Project
Element implementing the ArraySelector mixin, which records dynamic associations between item paths in a master items array and a selected array such that ......
Read more >
CSS selectors - CSS: Cascading Style Sheets - MDN Web Docs
The , selector is a grouping method that selects all the matching nodes. Syntax: A, B. Example: div, span will match both <span>...
Read more >
sortedArrayUsingSelector: | Apple Developer Documentation
Returns an array that lists the receiving array's elements in ascending order, as determined by the comparison method specified by a given selector....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found