It is bound to @kbd{H}.
+@vindex xwidget-webkit-disable-javascript
+@cindex disabling javascript in webkit buffers
+ JavaScript is enabled by default inside WebKit buffers, this can be
+undesirable as websites often use it to track your online activity. It
+can be disabled by setting the variable @code{xwidget-webkit-disable-javascript} to @code{t}.
+You must kill all WebKit buffers for this setting to take effect after
+it is changed.
+
@node Browse-URL
@subsection Following URLs
@cindex World Wide Web
where IELM input history will be saved. Customize it to nil to revert
to the old behavior of not remembering input history between sessions.
+** Xwidget Webkit
+
++++
+*** New user option 'xwidget-webkit-disable-javascript'.
+This allows disabling JavaScript in xwidget Webkit sessions.
+
\f
* New Modes and Packages in Emacs 30.1
:type '(choice (const :tag "Do not store cookies" nil) file)
:version "29.1")
+(defcustom xwidget-webkit-disable-javascript nil
+ "If non-nil, disables the execution of JavaScript in xwidget webkit sessions.
+You must kill all xwidget-webkit buffers for this setting to take
+effect after changing it."
+ :type '(boolean)
+ :version "30.0")
+
;;;###autoload
(defun xwidget-webkit-browse-url (url &optional new-session)
"Ask xwidget-webkit to browse URL.
#include "buffer.h"
#include "coding.h"
#include "xwidget.h"
-
#include "lisp.h"
#include "blockinput.h"
#include "dispextern.h"
/* Enable the developer extras. */
settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (xw->widget_osr));
g_object_set (G_OBJECT (settings), "enable-developer-extras", TRUE, NULL);
+ g_object_set (G_OBJECT (settings), "enable-javascript", !xwidget_webkit_disable_javascript, NULL);
}
gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width,
doc: /* List of all xwidget views. */);
Vxwidget_view_list = Qnil;
+ DEFVAR_BOOL("xwidget-webkit-disable-javascript", xwidget_webkit_disable_javascript,
+ doc: /* If non-nil, disables the execution of JavaScript in xwidget webkit sessions.
+You must kill all xwidget-webkit buffers for this setting to take
+effect after changing it. */);
+ xwidget_webkit_disable_javascript = false;
+
Fprovide (intern ("xwidget-internal"), Qnil);
id_to_xwidget_map = CALLN (Fmake_hash_table, QCtest, Qeq,