WebIDLpedia

Navigator interface

Definition

HTML Standard defines Navigator



partial interface Navigator {
  [SameObject] readonly attribute UserActivation userActivation;
};

[Exposed=Window]
interface Navigator {
  // objects implementing this interface also implement the interfaces given below
};
Navigator includes NavigatorID;
Navigator includes NavigatorLanguage;
Navigator includes NavigatorOnLine;
Navigator includes NavigatorContentUtils;
Navigator includes NavigatorCookies;
Navigator includes NavigatorPlugins;
Navigator includes NavigatorConcurrentHardware;

This interface is extended in the following specifications:

Consolidated IDL (across mixin and partials)


[Exposed=Window]
interface Navigator {
  [SameObject] readonly attribute UserActivation userActivation;
  readonly attribute DOMString appCodeName; // constant "Mozilla"
  readonly attribute DOMString appName; // constant "Netscape"
  readonly attribute DOMString appVersion;
  readonly attribute DOMString platform;
  readonly attribute DOMString product; // constant "Gecko"
  [Exposed=Window] readonly attribute DOMString productSub;
  readonly attribute DOMString userAgent;
  [Exposed=Window] readonly attribute DOMString vendor;
  [Exposed=Window] readonly attribute DOMString vendorSub;
  [Exposed=Window] boolean taintEnabled(); // constant false
  [Exposed=Window] readonly attribute DOMString oscpu;
  readonly attribute DOMString language;
  readonly attribute FrozenArray<DOMString> languages;
  readonly attribute boolean onLine;
  [SecureContext] undefined registerProtocolHandler(DOMString scheme, USVString url);
  [SecureContext] undefined unregisterProtocolHandler(DOMString scheme, USVString url);
  readonly attribute boolean cookieEnabled;
  [SameObject] readonly attribute PluginArray plugins;
  [SameObject] readonly attribute MimeTypeArray mimeTypes;
  boolean javaEnabled();
  readonly attribute boolean pdfViewerEnabled;
  readonly attribute unsigned long long hardwareConcurrency;
  [SameObject] readonly attribute StorageManager storage;
  [SameObject]
  readonly attribute Bluetooth bluetooth;
  Promise<undefined> deprecatedReplaceInURN(
    UrnOrConfig urnOrConfig, record<USVString, USVString> replacements);
  Promise<USVString> deprecatedURNtoURL(
    UrnOrConfig urnOrConfig, optional boolean send_reports = false);
  sequence<USVString> adAuctionComponents(unsigned short numAdComponents);
  [SecureContext] Promise<sequence<RelatedApplication>> getInstalledRelatedApps();
  Promise<HandwritingRecognizerQueryResult?>
      queryHandwritingRecognizer(HandwritingModelConstraint constraint);
  Promise<HandwritingRecognizer>
      createHandwritingRecognizer(HandwritingModelConstraint constraint);
    [SameObject] readonly attribute Ink ink;
  readonly attribute Scheduling scheduling;
  [SecureContext, SameObject] readonly attribute Keyboard keyboard;
  [SameObject] readonly attribute NetworkInformation connection;
  [SameObject] readonly attribute Serial serial;
  [SameObject] readonly attribute StorageBucketManager storageBuckets;
  Promise<undefined> joinAdInterestGroup(AuctionAdInterestGroup group);
  Promise<undefined> leaveAdInterestGroup(optional AuctionAdInterestGroupKey group = {});
  Promise<undefined> clearOriginJoinedAdInterestGroups(
      USVString owner, optional sequence<USVString> interestGroupsToKeep = []);
  Promise<(USVString or FencedFrameConfig)?> runAdAuction(AuctionAdConfig config);
  readonly attribute boolean deprecatedRunAdAuctionEnforcesKAnonymity;
  boolean canLoadAdAuctionFencedFrame();
  Promise<AdAuctionData> getInterestGroupAdAuctionData(AdAuctionDataConfig config);
  Promise<DOMString> createAuctionNonce();
  undefined updateAdInterestGroups();
  [SameObject] readonly attribute ProtectedAudience protectedAudience;
  [SecureContext] readonly attribute NavigatorUAData userAgentData;
  [SecureContext, SameObject]
  readonly attribute NavigatorManagedData managed;
    [SameObject] readonly attribute HID hid;
  [SameObject] readonly attribute USB usb;
  [SameObject] readonly attribute WindowControlsOverlay windowControlsOverlay;
  // The default audio session that the user agent will use when media elements start/stop playing.
  readonly attribute AudioSession audioSession;
  AutoplayPolicy getAutoplayPolicy(AutoplayPolicyMediaType type);
  AutoplayPolicy getAutoplayPolicy(HTMLMediaElement element);
  AutoplayPolicy getAutoplayPolicy(AudioContext context);
  Promise<undefined> setAppBadge(
    optional [EnforceRange] unsigned long long contents
  );
  Promise<undefined> clearAppBadge();
  Promise<BatteryManager> getBattery();
    boolean sendBeacon(USVString url, optional BodyInit? data = null);
  [SecureContext, SameObject] readonly attribute Clipboard clipboard;
  [SecureContext, SameObject] readonly attribute ContactsManager contacts;
  [SecureContext, SameObject] readonly attribute CredentialsContainer credentials;
    readonly attribute double deviceMemory;
  [SameObject] readonly attribute DevicePosture devicePosture;
  [SecureContext] Promise<MediaKeySystemAccess> requestMediaKeySystemAccess (
      DOMString keySystem,
      sequence<MediaKeySystemConfiguration> supportedConfigurations);
    [LegacyUnforgeable, SameObject] readonly attribute EpubReadingSystem epubReadingSystem;
  sequence<Gamepad?> getGamepads();
  [SameObject] readonly attribute Geolocation geolocation;
  [SameObject] readonly attribute MediaCapabilities mediaCapabilities;
  [SameObject, SecureContext] readonly attribute MediaDevices mediaDevices;
  [SameObject] readonly attribute PreferenceManager preferences;
  [SameObject] readonly attribute MediaSession mediaSession;
  [SameObject] readonly attribute Permissions permissions;
    readonly  attribute long maxTouchPoints;
  [SecureContext, SameObject] readonly attribute Presentation presentation;
  [SameObject] readonly attribute WakeLock wakeLock;
  [SecureContext, SameObject] readonly attribute ServiceWorkerContainer serviceWorker;
    boolean vibrate (VibratePattern pattern);
    [SecureContext, SameObject] readonly attribute VirtualKeyboard virtualKeyboard;
  readonly attribute LockManager locks;
  [SecureContext] Promise<undefined> share(optional ShareData data = {});
  [SecureContext] boolean canShare(optional ShareData data = {});
  readonly attribute boolean webdriver;
    [SameObject, SecureContext] readonly attribute GPU gpu;
  [SecureContext]
  Promise <MIDIAccess> requestMIDIAccess(optional MIDIOptions options = {});
  [SecureContext, SameObject] readonly attribute ML ml;
  [SecureContext, SameObject] readonly attribute XRSystem xr;
  // objects implementing this interface also implement the interfaces given below
};

Methods and attributes that return objects implementing Navigator

Referring IDL interfaces/dictionaries

Referring specifications