src/vs/workbench/api/common/extHostUriOpener.ts/ExtHostUriOpeners/registerExternalUriOpener
class ExtHostUriOpeners:	registerExternalUriOpener(
		extensionId: ExtensionIdentifier,
		id: string,
		opener: vscode.ExternalUriOpener,
		metadata: vscode.ExternalUriOpenerMetadata,
	): vscode.Disposable {
		if (this._openers.has(id)) {
			throw new Error(`Opener with id '${id}' already registered`);
		}

		const invalidScheme = metadata.schemes.find(scheme => !ExtHostUriOpeners.supportedSchemes.has(scheme));
		if (invalidScheme) {
			throw new Error(`Scheme '${invalidScheme}' is not supported. Only http and https are currently supported.`);
		}

		this._openers.set(id, opener);
		this._proxy.$registerUriOpener(id, metadata.schemes, extensionId, metadata.label);

		return toDisposable(() => {
			this._openers.delete(id);
			this._proxy.$unregisterUriOpener(id);
		});
	}