Table of Contents

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 IResponse

The response with the stream representing the source of the script.

options ScriptOptions

The options with the parameters for invoking the script.

cancel CancellationToken

The cancellation token.

Returns

Task

The task evaluating the script.

SupportsType(string)

Checks if the given type is supported.

bool SupportsType(string mimeType)

Parameters

mimeType string

The type of the script.

Returns

bool

True if the type is supported, otherwise false.