/JS-extract-css-selector

A JS function to extract CSS selector string for specified DOM element

Primary LanguageHTMLMIT LicenseMIT

Extract CSS selector

selector = extract_css_selector(dom);

This function will extract a CSS selector string for the given DOM element. It will try some heuristic to reduce the length of the selector.

DEMO

Demo page