-
include this script or better to include min file (dist/lokesh_pushup.min.js).
-
call
var disposeSelector = Selector.activateSelector()
-
click on the page element. That's it.
-
If you want to stop seeing css-selectors on the page, you kill it.
disposeSelector(); //handler will be removed from the page.
-
If you just want to use with other functions and control the output then you should use
calculateCssSelector
function. asvar cssSelectorForNode = Selector.calculateCssSelector(node);
-
If you want lib. to display
CSS-Selector
on the page but want to handle they when to call or where to add, then usedisplaySelector
. e.g. if you are usingjQuery
.$(document).ready(()=>{ $(document).on('click', Selector.displaySelector); });
-
Use
activateSelector
. If you don't want to control and want to use working model. you can disable it anytime.Selector.activateSelector()
-
For more Read the codebase. refer file
loeksh_pushup.js
-
For production use file
dist/lokesh_pushup.min.js
. -
Selector.activateSelector()
will note work in IE<8. for more follow link and due toArray.from
API.