This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The getNestedConfigs() method of the Fence interface returns the FencedFrameConfigs loaded into <fencedframe>s embedded inside the current <fencedframe>.
getNestedConfigs()
None.
getNestedConfigs() has two possible return values:
FencedFrameConfig objects, if the current <fencedframe>'s config was created using an API that supports nested configs (for example Protected Audience). Of these 20 configs, the first N configs are those registered through the API and the rest are padding configs that will navigate to about:blank, so that the number of configs is hidden and cannot leak any information.null if the current <fencedframe>'s config was created using an API that does not support nested configs (for example Shared Storage).// Run inside a <fencedframe>
// Retrieve the configs of embedded fenced frames
const configs = window.fence.getNestedConfigs();
// Set a new fenced frame's config to equal one of the retrieved configs
const frame = document.createElement("fencedframe");
frame.config = configs[0];
| Specification |
|---|
| Fenced Frame> # dom-fence-getnestedconfigs> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
getNestedConfigs |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | 126 | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Fence/getNestedConfigs