(new WebView()).getHTML() method anywhere? ...
Albretch Mueller
lbrtchx at gmail.com
Thu Aug 17 14:51:31 UTC 2023
No helpful hints whatsoever about how to get the source HTML of a page
right after it was rendered by the browser:
https://stackoverflow.com/questions/tagged/javafx+webview+webkit
https://stackoverflow.com/questions/17094990/javafx-webview-http-response-data
The more I learn about the JavaFx WebView, the more I suspect it was
written by Franz Kafka –Kevin Wright Aug 2, 2018 at 14:21
As I gathered based on the documents I have read, with previous
versions of JavaFX/WebView you could define a custom
URLStreamHandlerFactory. That option/feature was obviously
removed/obfuscated by design. I am sure I am not the only one who
would need such a feature.
// __ use case: in a controlled environment, such as a school,
teachers would be trusted with the kind of web sites they get some
content for their classes. Their devices would have unconstrained
access to the Internet. Once they download/"view" a page it is kept in
a cache and if they ultimately post it to the students as part of
their work, that page is thoroughly doctored to remove any extra
distracting nonsense (such as ads, unrelated links, pop ups, ...). I
am a teacher. I find quite abusive exposing children to all that
nonsense when you are trying to teach them. Web developers call it
themselves "technologies of attention"! Students will be able to
access only the doctored cache content. That should be enforced at
least in schools. The rest of the day they definitely can go about
what they see as "their business".
Webkit is open source anyway. So anyone could instrument a fork and
expose that internal capability, but people tend to be busy doing
their own things and in my case I don't like to touch anything that I
know I won't keep maintaining. I think javafx developers themselves
will hopefully be able to see my point. They technically can. Some
sort of:
ObservableValue<? extends State> obs, State oldState, State newState) {
switch (newState) {
case SUCCEEDED -> dumpHTMLSource(File LokalPath);
...
}
is needed.
Thank you,
lbrtchx
More information about the openjfx-dev
mailing list