mk-soft wrote: ↑Sun Feb 06, 2022 9:11 pm
I have extended my modules for the WebGadget with RunJavaScript. It works
JavaScript 'window.scrollTo(0,500);'
By the way, Mk-Soft: I was just checking the documentation of webkit2gtk, since it's what we will have to deal in the future, and I noticed: the WebKitDOMDOMWindow is still present, as part of the WebKitDOMGTK+ . Since it is not deprecated, you should still be able to perform basic window content operations without javascript (as expected). See
https://webkitgtk.org/reference/webkitd ... indow.html
With libWebKit2Gtk-4.0 you should still be able to get the WebKitDOMDocument with
webkit_web_view_get_dom_document(GadgetID( webGadgetNum )) ,
the WebKitDOMDOMWindow with
webkit_dom_document_get_default_view( *the_WebKitDOMDocument ) ,
then read the y-position with
webkit_dom_dom_window_get_scroll_y( *the_WebKitDOMDOMWindow ) ,
and write the y-position with
webkit_dom_dom_window_move_to( *the_WebKitDOMDOMWindow, 0.0, 1234.0 )
Basically the code of post
https://www.purebasic.fr/english/viewto ... 24#p580424 ,
just changing the library name in the imports section. Does it work on your side? I am currently unable to try Ubuntu 20.xx (hardware issues and slow repairs...)