Spaces:
Configuration error
Configuration error
Download web/apps/labelstudio/src/utils/selectors.js from bisalsaha/lebel-studio: direct link, hf CLI and curl.
- Browser
- Download file 305 Bytes
-
https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/apps/labelstudio/src/utils/selectors.js
- Command line
-
hf download hf://spaces/bisalsaha/lebel-studio/web/apps/labelstudio/src/utils/selectors.js
-
curl -L -o selectors.js https://huggingface.co/spaces/bisalsaha/lebel-studio/resolve/main/web/apps/labelstudio/src/utils/selectors.js
305 Bytes
| /** | |
| * | |
| * @param {HTMLElement} element | |
| * @param {string} selector | |
| */ | |
| export const matchesSelector = (element, selector) => { | |
| const matched = element?.matches?.(selector); | |
| if (matched) return element; | |
| const closest = element?.closest?.(selector); | |
| if (closest) return closest; | |
| return null; | |
| }; | |