From: Aaron Conole <aconole@bytheb.org>
To: emacs-devel <emacs-devel@gnu.org>, joakim@verona.se
Subject: [PATCH RFC 2/2] Expose the user-agent setting with a getter/setter
Date: Mon, 6 Jun 2016 14:18:10 -0400 [thread overview]
Message-ID: <1465237090-24315-3-git-send-email-aconole@bytheb.org> (raw)
In-Reply-To: <1465237090-24315-1-git-send-email-aconole@bytheb.org>
* lisp/xwidget.el (xwidget-webkit-get-user-agent): New function to get
the user agent for the current webkit session
(xwidget-webkit-set-user-agent): New function to set the user agent
for the current webkit session
---
lisp/xwidget.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index 7a0ca8b..64fe899 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -462,6 +462,18 @@ xwidget-webkit-current-url
(message "url: %s" url)
url))
+(defun xwidget-webkit-get-user-agent ()
+ "Get the webkit UserAgent string."
+ (interactive)
+ (xwidget-webkit-get-web-string-setting (xwidget-webkit-current-session)
+ "user-agent"))
+
+(defun xwidget-webkit-set-user-agent (ua)
+ "Set the webkit UserAgent string."
+ (interactive)
+ (xwidget-webkit-set-web-string-setting (xwidget-webkit-current-session)
+ "user-agent" ua))
+
(defun xwidget-webkit-execute-script-rv (xw script &optional default)
"Same as `xwidget-webkit-execute-script' but with return value.
XW is the webkit instance. SCRIPT is the script to execute.
--
2.5.5
prev parent reply other threads:[~2016-06-06 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 18:18 [PATCH RFC 0/2] xwidget-webkit settings Aaron Conole
2016-06-06 18:18 ` [PATCH RFC 1/2] Expose webkit view settings via lisp Aaron Conole
2016-06-06 18:18 ` Aaron Conole [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465237090-24315-3-git-send-email-aconole@bytheb.org \
--to=aconole@bytheb.org \
--cc=emacs-devel@gnu.org \
--cc=joakim@verona.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.