Fence: getNestedConfigs() method

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>.

Syntax

js
getNestedConfigs()

Parameters

None.

Return value

getNestedConfigs() has two possible return values:

Examples

js
// 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];

Specifications

See also