Interface IScriptingService
- Namespace
- AngleSharp.Scripting
- Assembly
- AngleSharp.dll
Defines the API of an available engine for running scripts provided in the code.
public interface IScriptingService
- Extension Methods
Methods
EvaluateScriptAsync(IResponse, ScriptOptions, CancellationToken)
Evaluates a script for the given response asynchronously.
Task EvaluateScriptAsync(IResponse response, ScriptOptions options, CancellationToken cancel)
Parameters
response
IResponseThe response with the stream representing the source of the script.
options
ScriptOptionsThe options with the parameters for invoking the script.
cancel
CancellationTokenThe cancellation token.
Returns
- Task
The task evaluating the script.
SupportsType(string)
Checks if the given type is supported.
bool SupportsType(string mimeType)
Parameters
mimeType
stringThe type of the script.
Returns
- bool
True if the type is supported, otherwise false.