webkitgtk

Waiting for a website to load completely with WebKitGTK+ [duplicate]

血红的双手。 提交于 2020-01-02 19:14:09
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Webkit GTK: Determine when a document is finished loading I want to fetch a website's HTML contents with WebKitGTK+ to handle the javascript redirections automatically. I am using the following Python code: def scanURL(domain, retries=3): status = 0 loading = 0 browser = webkit.WebView() browser.open('http://' + domain) while browser.get_load_status() < 2: continue if browser.get_load_status() == 4: if retries

Scrolling a WebKit2.Webkit window in GTK+3

▼魔方 西西 提交于 2019-12-22 08:24:07
问题 How does one scroll a webkit2gtk widget? In webkitgtk (aka. webkit1 ) you wrap your WebView in a ScrolledWindow , so can use its vadjustment property. For wekit2gtk , this call on the WebView just returns None , and I see no other method to call. As an explanation, I want to add touch support to webkit2 . I have hacked my way into this by adding a transparent layer over the WebView widget ¹, but now I'm detecting touches I seem unable to use them. ¹ A release that came out today has removed

How to access a JSCValue Object's properties

◇◆丶佛笑我妖孽 提交于 2019-12-11 10:54:26
问题 With the following code: #include <webkit2/webkit-web-extension> /* Skipping through a lot of code */ { JSCValue* result = jsc_context_evalutate(jsCtx, "document.getElementsByTagName('body')", -1); std::cout << jsc_value_to_string(jsc_value_object_get_property_at_index(result, 0)) << "\n"; if (jsc_value_object_is_instance_of(result, "HTMLBodyElement")) std::cout << "Instance of HTMLBodyElement\n"; } I get [object HTMLBodyElement] printed but not Instance of HTMLBodyElement . I have a few

Waiting for a website to load completely with WebKitGTK+ [duplicate]

♀尐吖头ヾ 提交于 2019-12-06 11:08:23
This question already has an answer here : Closed 7 years ago . Possible Duplicate: Webkit GTK: Determine when a document is finished loading I want to fetch a website's HTML contents with WebKitGTK+ to handle the javascript redirections automatically. I am using the following Python code: def scanURL(domain, retries=3): status = 0 loading = 0 browser = webkit.WebView() browser.open('http://' + domain) while browser.get_load_status() < 2: continue if browser.get_load_status() == 4: if retries > 0: return scanURL(domain, retries - 1) return 'Failed' return 'Success' The website loads fine, but

Scrolling a WebKit2.Webkit window in GTK+3

落爺英雄遲暮 提交于 2019-12-05 16:14:13
How does one scroll a webkit2gtk widget? In webkitgtk (aka. webkit1 ) you wrap your WebView in a ScrolledWindow , so can use its vadjustment property. For wekit2gtk , this call on the WebView just returns None , and I see no other method to call. As an explanation, I want to add touch support to webkit2 . I have hacked my way into this by adding a transparent layer over the WebView widget ¹, but now I'm detecting touches I seem unable to use them. ¹ A release that came out today has removed the need for the layer on-top. Nevertheless, I have touches and nothing I can do with them. The process

Webkit GTK: Determine when a document is finished loading

偶尔善良 提交于 2019-12-01 06:27:27
There are other questions on StackOverflow which are close to what I want to know, like Webkit GTK :: How to detect when a download has finished? , but I think I'm asking something a bit different: In general, in the event-driven C Webkit-GTK API there are a lot of events which may relate to the idea of when some document is finished "loading". The problem is the documentation is pretty sparse, and the idea of "finished loading" isn't necessarily clear, because it can refer to a lot of things. Does "finished loading" mean that the document is finished downloading ? That it's finished creating

Webkit GTK: Determine when a document is finished loading

家住魔仙堡 提交于 2019-12-01 04:42:33
问题 There are other questions on StackOverflow which are close to what I want to know, like Webkit GTK :: How to detect when a download has finished?, but I think I'm asking something a bit different: In general, in the event-driven C Webkit-GTK API there are a lot of events which may relate to the idea of when some document is finished "loading". The problem is the documentation is pretty sparse, and the idea of "finished loading" isn't necessarily clear, because it can refer to a lot of things.