ProtocolHandlerOptions Class

The host hooks of the protocol handlers (https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers): the handlers that the pages register with navigator.registerProtocolHandler() are stored in ProtocolHandlerOptions.Registry, and a navigation to a URL of their scheme navigates to the handler instead.

public sealed class ProtocolHandlerOptions

Constructors

NameDescription
ProtocolHandlerOptions()

ProtocolHandlerOptions()

ProtocolHandlers.cs
public ProtocolHandlerOptions()

No documentation is available.

Properties

NameDescription
RegistryGets the handlers of the user agent: the browsing contexts that share these options share their handlers.
RequestRegistrationGets or sets the callback that asks the user whether to register a handler, when the registerProtocolHandler() automation mode of the document is ProtocolHandlerAutomationMode.None. It returns true when the user accepts. It is invoked on the thread of the event loop, and must not block it. The default is null: there is no user to accept the registrations, so they are not registered.

Gets the handlers of the user agent: the browsing contexts that share these options share their handlers.

public ProtocolHandlerRegistry Registry { get; init; }

RequestRegistration

ProtocolHandlers.cs

Gets or sets the callback that asks the user whether to register a handler, when the registerProtocolHandler() automation mode of the document is ProtocolHandlerAutomationMode.None. It returns true when the user accepts. It is invoked on the thread of the event loop, and must not block it. The default is null: there is no user to accept the registrations, so they are not registered.

public Func<ProtocolHandlerRegistration, bool>? RequestRegistration { get; init; }