BrowsingContextExtensions
A set of extensions for the browsing context.
Creates the specified target browsing context.
Gets the specified target browsing context.
Tries to get the command with the given name.
Gets the cookie for the given URL, if any.
Tries to get the CSS styling service, if available.
Gets the culture info associated with the current context.
Gets the culture from the language string (or the current culture).
Gets the default encoding to use as initial guess.
Checks if the context is waiting for tasks from originator of type
T to finish downloading.
Gets a factory service instance. Exactly one has to be available.
Tries to get the JavaScript service, if available.
Gets the language of the current context.
Gets the navigation handler that supports the provided protocol.
Gets a provider service instance. At most one has to be available.
public static IResourceService<TResource> GetResourceService<TResource>(this IBrowsingContext context, string type) where TResource : IResourceInfo
Gets a resource service. Multiple resource services may be registered, so
the one that matches the given mime-type will be returned, if any.
Tries to get the scripting service for the given mime-type.
Gets the spell check service for the given language, if any.
Tries to get the styling service for the given mime-type.
Fires an interactive event at the given context.
Gets if the context allows scripting or not.
Navigates to the given document. Includes the document in the
session history and sets it as the active document.
public static Task<IDocument> OpenAsync(this IBrowsingContext context, IResponse response, CancellationToken cancel = default)
Opens a new document created from the response asynchronously in
the given context.
public static Task<IDocument> OpenAsync(this IBrowsingContext context, DocumentRequest request, CancellationToken cancel = default)
Opens a new document loaded from the specified request
asynchronously in the given context.
public static Task<IDocument> OpenAsync(this IBrowsingContext context, Url url, CancellationToken cancel = default)
Opens a new document loaded from the provided url asynchronously in
the given context.
public static Task<IDocument> OpenAsync(this IBrowsingContext context, Action<VirtualResponse> request, CancellationToken cancel = default)
Opens a new document loaded from a virtual response that can be
filled via the provided callback.
public static Task<IDocument> OpenAsync(this IBrowsingContext context, string address, CancellationToken cancellation = default)
Opens a new document loaded from the provided address asynchronously
in the given context.
public static Task<IDocument> OpenNewAsync(this IBrowsingContext context, string url = null, CancellationToken cancellation = default)
Opens a new document without any content in the given context.
Resolves the given target context.
Sets the cookie for the given URL.
Notifies the context of an exception that was handled internally.