blob: f4fa78921b475a7ab255e2462f8dd72da70bd58c [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.
dictionary ResolveCallbackResolveInfo {
// The result code. Zero indicates success.
required long resultCode;
// A string representing the IP address literal. Supplied only if resultCode
// indicates success.
DOMString address;
};
// Use the <code>chrome.dns</code> API for dns resolution.
interface Dns {
// Resolves the given hostname or IP address literal.
// |hostname| : The hostname to resolve.
// |Returns|: Called when the resolution operation completes.
// |PromiseValue|: resolveInfo
[requiredCallback] static Promise<ResolveCallbackResolveInfo> resolve(
DOMString hostname);
};
partial interface Browser {
static attribute Dns dns;
};