Table of Contents

Interface INavigatorContentUtilities

Namespace
AngleSharp.Browser.Dom
Assembly
AngleSharp.dll

A set of utilities to modify the navigator's behavior.

[DomName("NavigatorContentUtils")]
[DomNoInterfaceObject]
public interface INavigatorContentUtilities
Extension Methods

Methods

IsContentHandlerRegistered(string, string)

Checks if any handler is registered at the given URI for the specified mime-type.

[DomName("isContentHandlerRegistered")]
bool IsContentHandlerRegistered(string mimeType, string url)

Parameters

mimeType string

The mime-type to check for.

url string

The URI to the handler.

Returns

bool

True if a handler is registered, otherwise false.

IsProtocolHandlerRegistered(string, string)

Checks if any handler is registered at the given URI for the specified scheme.

[DomName("isProtocolHandlerRegistered")]
bool IsProtocolHandlerRegistered(string scheme, string url)

Parameters

scheme string

The scheme to check for.

url string

The URI to the handler.

Returns

bool

True if a handler is registered, otherwise false.

RegisterContentHandler(string, string, string)

Allows web sites to register themselves as possible handlers for content of a particular MIME type.

[DomName("registerContentHandler")]
void RegisterContentHandler(string mimeType, string url, string title)

Parameters

mimeType string

The desired MIME type as a string.

url string

The URI to the handler as a string.

title string

The title of the handler presented to the user as a string.

RegisterProtocolHandler(string, string, string)

Allows web sites to register themselves as possible handlers for particular protocols.

[DomName("registerProtocolHandler")]
void RegisterProtocolHandler(string scheme, string url, string title)

Parameters

scheme string

The protocol the site wishes to handle, specified as a string.

url string

The URI to the handler as a string.

title string

The title of the handler presented to the user as a string.

UnregisterContentHandler(string, string)

Removes the specified content handler, if any.

[DomName("unregisterContentHandler")]
void UnregisterContentHandler(string mimeType, string url)

Parameters

mimeType string

The name of the handled mime-type to remove.

url string

The URI to the handler of the mime-type.

UnregisterProtocolHandler(string, string)

Removes the specified protocol handler, if any.

[DomName("unregisterProtocolHandler")]
void UnregisterProtocolHandler(string scheme, string url)

Parameters

scheme string

The name of the handled scheme to remove.

url string

The URI to the handler of the scheme.