-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vienna 3.8 beta – Applescript: cannot get HTML source #1523
Comments
It only returns the source if the currently active tab is not the articles list/article page. Perhaps @TAKeanice can explain whether this was intentional. |
For the articles tab the HTML is stored in the cache directory and could theoretically be retrieved from there. I am not sure if the issue is due to a mistake in the Article View or due to the WebView behaving differently when a local document is loaded. It is not intentional. For the Web Inspector, you can use Safari, provided the private WebKit debugging setting is activated on compiling Vienna. Theoretically that could be made into a setting in Viennas Preferences. |
For the debug setting, see Vienna/Sources/Main window/WKPreferences+Private.h You may turn it on in the initializer of CustomWKWebView. |
hmm. Hopefully there is some sort of workaround?
Now that would be quite nice, I suspect I am not the only one who uses the inspector tool. |
Didn’t this command work for you ? (quit Vienna beforehand…)
That has worked for a long time, and still does as long as you have the “old” browser enabled. Right click any element in article view, you’ll see the “Inspect element” entry in the context menu. |
I have only tested it in developer builds with the WebKit (“new”) browser enabled. The |
Yes with WKWebView that command does not work (as alluded in my OP), lots of discussions on stackoverflow about that. That is why I turned back to my Old Applescript(s) only that does not work either (In Vienna; I have a AppleScript working with NNW). |
I was merely pointing out that exposing the web inspector private API via a toggle in advanced preferences, as suggested by TAKeanice, is not an option. Instead, the AppleScript function |
For me, access to debugging is possible through Safari's Development menu. You probably also need the |
This issue hasn't been updated in a while so we're going to mark it as |
this is still relevant, FWIW |
This will be fixed in 3.9.0, at least for recent versions macOS Ventura (commit e0f288b2ed57ec5e486300a2b3555bc57fe2c000 included in PR #1666) |
This issue hasn't been updated in a while so we're going to mark it as |
A basic applescript using
get documentHTMLSource
to open the HTML source of an article in a code editor fails (per the Vienna AS dictionary).Result: the script opens a blank document. This fails independently of the “new“ browser (WKWebView). It worked fine in 3.7.x.
The following script opens the HTML source in a new BBEdit document (I have a similar one for SubEthaEdit).
PS – this is a bit annoying for debugging feeds as the Web inspector cannot be used in WKWebView, unless I miss a magic incantation. The Web inspector still works in the “old” browser.
The text was updated successfully, but these errors were encountered: