Function: xwidget-webkit-scroll-forward
xwidget-webkit-scroll-forward is an interactive and byte-compiled
function defined in xwidget.el.gz.
Signature
(xwidget-webkit-scroll-forward &optional N)
Documentation
Scroll webkit horizontally by N chars.
If the widget is larger than the window, hscroll by N columns
instead. The width of char is calculated with
window-font-width. If N is omitted or nil, scroll forwards by
one char.
Probably introduced at or before Emacs version 25.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/xwidget.el.gz
(defun xwidget-webkit-scroll-forward (&optional n)
"Scroll webkit horizontally by N chars.
If the widget is larger than the window, hscroll by N columns
instead. The width of char is calculated with
`window-font-width'. If N is omitted or nil, scroll forwards by
one char."
(interactive "p" xwidget-webkit-mode)
(let ((session (xwidget-webkit-current-session)))
(if (> (- (aref (xwidget-info session) 2)
(window-text-width nil t))
(window-font-width))
(set-window-hscroll nil (+ (window-hscroll) n))
(xwidget-webkit-execute-script session
(format "window.scrollBy(%d, 0);"
(* n (window-font-width)))))))