I'm trying to get the scrollbar position in a WebKitWebView. I've read enough documentation to know that there's no intuitive way.
It needs to be packaged into one executable, so a WebKitExtension won't cut it out.
I don't even know where to begin so I won't be writing any MRE
Note: I could use JavaScript if the need arises, but I don't know how to communicate with the native application in the first place.
Edit: this source code is pretty bad. Use it if and only if you're gonna correct it.
Ok y'all little boys, girls and non-euclidean space beings, I've come to infatuate your sad, tired and frustrated neurons with some delicious knowledge:
I've done it (AT LONG LAST), 3 weeks after asking this question. I've had to use a WebKitExtension in order to do this. Rejoice your brain and cerebellum, for an example shitty source code is here:
Compile it with:
g++ extension.cpp -shared -fPIC -o extension.so `pkg-config webkit2gtk-web-extension-4.0 --libs --cflags` -std=c++17
Also: please take a look at the official documentation for more guidelines to know how the hecc you could use extensions in your WebKitGTK project.
Before anybody begins hating me: I've used deprecated functions for this to work and I've used temporary files. The reason is that I don't know how to use the JavaScriptCore API (I'm still to see where is the documentation) and also that I don't know how to communicate between extensions.