Skip to content

thomaspeklak/get-query-selector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#getQuerySelector

returns the query selector for a given dom node. The result can be directly fed to document.querySelector. It uses body, #ids and :nth-child(i) to compose the selector.

##Usage

var getQuerySelector = require("get-query-selector");

var aNodes = document.getElementByTagName("A");
var aNode = aNodes[aNodes.length - 1];

var selector = getQuerySelector(aNode);

About

returns the query selector for a given dom node

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published