Get to know MDN better
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
The selectURL() method of the WindowSharedStorage interface executes a URL Selection operation that is registered in a module added to the current origin's SharedStorageWorklet.
Note: The URL Selection output gate is used to select a URL from a provided list to display to the user, based on shared storage data.
A string representing the registered operation's name within the shared storage worklet module. It must match the name given to the operation when it is registered with SharedStorageWorkletGlobalScope.register().
urlsAn array of objects representing the URLs to be chosen between by the URL Selection operation. Each object contains two properties:
urlA string representing the URL.
reportingMetadata OptionalAn object containing properties where names are event types and values are URLs pointing to reporting destinations, for example "click" : "my-reports/report1.html". The URLs act as destinations for reports submitted with a destination of type "shared-storage-select-url", typically submitted via a Fence.reportEvent() or Fence.setReportEventDataForAutomaticBeacons() method call.
options OptionalAn options object, which can contain the following properties:
data OptionalAn object representing any data required for executing the operation.
keepAlive OptionalA boolean value. If set to true, the SharedStorageWorkletGlobalScope of the associated worklet is kept alive, and the operation can be run again. Therefore, you need to set keepAlive to true for each operation that is not intended to be the last one. The default value, false, means that the SharedStorageWorkletGlobalScope is terminated after the operation is run and cannot be run again.
resolveToConfig OptionalA boolean value. If set to true, the fulfillment value of the Promise returned by run() will be a FencedFrameConfig object that can be used to load content into a <fencedframe> via its config attribute. The default value, false, means that the fulfillment value will be a URL that can be used to load content into an <iframe>.
A Promise that fulfills with a FencedFrameConfig object or a string representing a URL, depending on the value of the resolveToConfig option.
Thrown if:
See the Shared Storage API landing page for a walkthrough of this example and links to other examples.
Enable JavaScript to view this browser compatibility table.
This page was last modified on Dec 15, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.