Skip to content

Future Goals: CSS selectors and CEFSharp  #6

@Esowteric

Description

@Esowteric

Great project, thanks! Have got URL blocking working fine in a CEFSharp browser project's BrowserRequestHandler class. It stops a torrent of ads on sites like www.tvguide.co.uk, and the code (called in OnBeforeBrowse() and OnBeforeResourceLoad()) is fast.

Looking forward to being able to hide content using CSS.

In the case of CEFSharp, I already examine the DOM in .NET using HtmlAgilityPack. To get the DOM, I can either use frame.GetSourceAsync() or browser.GetSourceAsync() in the browser's FrameLoadEnd() handler. Or I can get it from javascript, using a .NET BoundObject class (that allows communication between .NET and javascript).

Not sure how to apply the CSS to the loaded content. In OnFrameLoadEnd(), I can call ExecuteJavaScriptAsync(), and perhaps that could be used to set the CSS?

Sorry: I'm just thinking aloud here. Many thanks again.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions