How do I evaluate JS and return value with Elisp? #836
-
The wiki recommend this snippet to evaluate JS in Python, text = self.buffer_widget.execute_js("get_selection();") So to replicate this in elisp, I opened an (eaf-call-sync "call_function_with_args" eaf--buffer-id "execute_js" "get_selection();") And it gave me this message, So this time, I use (eaf-call-sync "call_function_with_args" eaf--buffer-id "eval_js" "get_selection();") And it gave me this, Did I do something wrong? Can you give me some guide? That would be really helpful, thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
manateelazycat
Aug 28, 2021
Replies: 1 comment
-
Upgrade EAF and make sure JavaScript function's name is attribue of window object. And call JS function like below:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
c1-g
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Upgrade EAF and make sure JavaScript function's name is attribue of window object.
And call JS function like below: