blob: d25ed29836b51957871e8607d379fac411a3d2fb [file] [log] [blame]
// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// `protocol_handlers` manifest key defintion. Protocol Handlers allow developers
// to let extensions register Custom Handlers for URL's schemes unknown to the
// Browser. This manifest key provides a similar behavior than the Web API
// implementing the Custom Handlers section of the HTML specification.
// https://html.spec.whatwg.org/#custom-handlers
[generate_error_messages] namespace protocolHandlers {
// A ProtocolHandler registers the register a Custom Hanlder for an unknown
// URL scheme.
// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/protocol_handlers
dictionary ProtocolHandler {
// A string definition of the protocol to handle.
DOMString protocol;
// A string representation of the protocol handlers, displayed to the user when prompting for permissions.
DOMString name;
// A string representing the URL of the protocol handler (must be a localizable property).
DOMString uriTemplate;
};
dictionary ManifestKeys {
ProtocolHandler[] protocol_handlers;
};
};