Function: js-eval
js-eval is an interactive and byte-compiled function defined in
js.el.gz.
Signature
(js-eval JS)
Documentation
Evaluate the JavaScript in JS and return JSON-decoded result.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defun js-eval (js)
"Evaluate the JavaScript in JS and return JSON-decoded result."
(interactive "MJavaScript to evaluate: ")
(with-js
(let* ((content-window (js--js-content-window
(js--get-js-context)))
(result (js-eval content-window js)))
(when (called-interactively-p 'interactive)
(message "%s" (js! "String" result)))
result)))