Function: web-mode-dom-xpath
web-mode-dom-xpath is an interactive and natively compiled function
defined in web-mode.el.
Signature
(web-mode-dom-xpath &optional POS)
Documentation
Display html path.
Key Bindings
web-mode-map C-c C-d x
Source Code
;; Defined in /nix/store/2qgnz1rp30nzfz6w0apx4kdm14if1bbs-emacs-packages-deps/share/emacs/site-lisp/elpa/web-mode-20260831.219/web-mode.el
(defun web-mode-dom-xpath (&optional pos)
"Display html path."
(interactive)
(unless pos (setq pos (point)))
(save-excursion
(goto-char pos)
(let (path tag)
(while (web-mode-element-parent)
(looking-at web-mode-tag-regexp)
(setq tag (match-string-no-properties 1))
(setq path (cons tag path))
)
(message "/%s" (mapconcat 'identity path "/"))
)))