AngleSharp / AngleSharp.Js

:angel: Extends AngleSharp with a .NET-based JavaScript engine.

Home Page:https://anglesharp.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need to be able turn off JsNavigationHandler

vladomelchenko opened this issue · comments

I need to use angle sharp with js engine without loading scripts on html pages, only for execute my scripts.
Now in JsConfigurationExtensions i cant remove JsNavigationHandler from configuration, but i need this ability

Well, the NavigationHandler only handles javascript: URLs. It does not run the scripts.

You can disable the navigation handler even today:

var config = Configuration.Default.WithJs().Without<JsNavigationHandler>();

If all scripts on a given website are external, then just disabling resource loading would help (its by default disabled anyway).

I'm not sure if its sufficient for your use case though.