Interface IBrowsingContext
- Namespace
- AngleSharp
- Assembly
- AngleSharp.dll
Represents the browsing context interface.
public interface IBrowsingContext : IEventTarget, IDisposable
- Inherited Members
- Extension Methods
Properties
Active
Gets or sets the currently active document.
IDocument? Active { get; set; }
Property Value
Creator
Gets the document that created the current context, if any. The creator is the active document of the parent at the time of creation.
IDocument? Creator { get; }
Property Value
Current
Gets the current window proxy.
IWindow? Current { get; }
Property Value
OriginalServices
Gets the original services for the browsing context.
IEnumerable<object> OriginalServices { get; }
Property Value
Parent
Gets the parent of the current context, if any. If a parent is available, then the current context contains only embedded documents.
IBrowsingContext? Parent { get; }
Property Value
Security
Gets the sandboxing flag of the context.
Sandboxes Security { get; }
Property Value
SessionHistory
Gets the session history of the given browsing context.
IHistory? SessionHistory { get; }
Property Value
Methods
CreateChild(string?, Sandboxes)
Creates a new browsing context with the given name, instructed by the specified document.
IBrowsingContext CreateChild(string? name, Sandboxes security)
Parameters
Returns
- IBrowsingContext
The created browsing context.
FindChild(string)
Tries to find a browsing context with the given name.
IBrowsingContext? FindChild(string name)
Parameters
name
stringThe name of the context.
Returns
- IBrowsingContext
A context with the name, otherwise null.
GetService<T>()
Gets an instance of the given service.
T? GetService<T>() where T : class
Returns
- T
The instance of the service or null.
Type Parameters
T
The type of service to resolve.
GetServices<T>()
Gets all registered instances of the given service.
IEnumerable<T> GetServices<T>() where T : class
Returns
- IEnumerable<T>
An enumerable with all service instances.
Type Parameters
T
The type of service to resolve.