Root element ignored in options, full path returned
See original GitHub issueContext page : http://histo.io
Code to execute in order to test it (x = 165, y = 305):
function testCase(x, y) {
const root = document.querySelector('nav > ul > li > ul');
const result = CssSelectorGenerator.getCssSelector(document.elementFromPoint(x, y), { blacklist: ['[href=*]', '[src=*]'], root: root });
console.log(result);
// :root > :nth-child(2) > :nth-child(4) > :nth-child(2) > :nth-child(1) > :nth-child(1) > :nth-child(2) > :nth-child(5) > :nth-child(1);
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Why does node's path.resolve allow but ignore multiple root ...
Now that we have resolved and got our absolute path we can ignore the other parameters present and return /bar/baz.
Read more >Path | Node.js v19.3.0 Documentation
The path.parse() method returns an object whose properties represent significant elements of the path . Trailing directory separators are ignored, see path.sep ...
Read more >Path.Combine Method (System.IO) - Microsoft Learn
If one of the specified paths is a zero-length string, this method returns the other path. If path2 contains an absolute path, this...
Read more >os.path — Common pathname manipulations — Python 3.11 ...
Return the longest common sub-path of each pathname in the sequence paths. Raise ValueError if paths contain both absolute and relative pathnames, the...
Read more >isaacs/node-glob: glob functionality for node.js - GitHub
root The place where patterns starting with / will be mounted onto. Defaults to path.resolve(options.cwd, "/") ( / on Unix systems, and C:\...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re absolutely right. I noticed that some generated selectors are now shorter than before 😃.
Thank you for your efforts.
Thanks for quick reply. Unfortunately error still here (I doubled checked I was using version 3.4.1).
EDIT : I checked with the exact same test case.