Closed GoogleCodeExporter closed 9 years ago
You must subscribe to an event of <webkitbrowser>.ResourceIntercepter. You must
add a handler to ResourceSendRequest and inside the code: if
e.Resource.MimeType.Contains("image") or e.Resource.MimeType.Contains("flash")
then
e.SendRequest = false : end if
Original comment by tsumalis96@gmail.com
on 21 Mar 2012 at 3:05
Hi Tsumali,
The code says that
'ResourceIntercepter' is not an event of 'WebKit.WebKitBrowser'
'Resource' is not a member of 'WebKit.WebKitResourceRequestEventArgs'
'Resource' is not a member of 'WebKit.WebKitResourceRequestEventArgs'
''' The last two are in the "Private Sub ResourceSendRequest" below
This is my code:
Dim Browser As New WebKit.WebKitBrowser
AddHandler Browser.ResourceIntercepter, AddressOf ResourceSendRequest
Private Sub ResourceSendRequest(ByVal sender As Object, ByVal e As WebKit.WebKitResourceRequestEventArgs)
If e.Resource.MimeType.Contains("image") Or e.Resource.MimeType.Contains("flash") Then
Debug.Text = Debug.Text + " " + e.ResourceUrl
e.SendRequest = False
End If
End Sub
Is there something that I miss?
Original comment by dothebe...@gmail.com
on 22 Mar 2012 at 7:19
You must add a handler to Browser.ResourceIntercepter.ResourceSendRequest,
Browser.ResourceIntercepter is not an event
Original comment by tsumalis96@gmail.com
on 23 Mar 2012 at 1:24
Hi tsumali,
Yes it works great now.
Thank you
Original comment by dothebe...@gmail.com
on 23 Mar 2012 at 9:50
Original issue reported on code.google.com by
dothebe...@gmail.com
on 20 Mar 2012 at 10:48