Table of Contents

Class HTMLFencedFrameElement

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The HTMLFencedFrameElement interface represents a fencedframe element in JavaScript and provides configuration properties.
[Value("HTMLFencedFrameElement")]
public class HTMLFencedFrameElement : HTMLElement
Inheritance
HTMLFencedFrameElement
Inherited Members

Remarks

-Fenced frames on privacysandbox.google.com
-The Privacy Sandbox on privacysandbox.google.com

See also on MDN

Constructors

HTMLFencedFrameElement()

public HTMLFencedFrameElement()

Properties

Allow

NOTE
Experimental
The allow property of the HTMLFencedFrameElement gets and sets the value of the corresponding {{htmlelement("fencedframe")}} allow attribute, which represents a Permissions Policy applied to the content when it is first embedded.
[Value("allow")]
public string Allow { get; set; }

Property Value

string

A string representing a Permissions Policy.

Remarks

Not all permissions policies are allowed in fenced frames. The allowed permissions are listed at Permissions policies available to fenced frames — these are required for fenced frame content originating from the specified APIs to load. If you don't set the allow attribute, those permissions will be allowed by default. If you want to narrow down the permissions set, you need to make sure that all of the required permissions for the APIs you are using are set in the allow attribute.

-Fenced frames on privacysandbox.google.com
-The Privacy Sandbox on privacysandbox.google.com

See also on MDN

Config

NOTE
Experimental
The config property of the HTMLFencedFrameElement contains a FencedFrameConfig object, which represents the navigation of a {{htmlelement("fencedframe")}}, i.e., what content will be displayed in it. A FencedFrameConfig is returned from a source such as the Protected Audience API.
[Value("config")]
public FencedFrameConfig? Config { get; set; }

Property Value

FencedFrameConfig

The value of config is initially null.When its value is set to a FencedFrameConfig object instance, the FencedFrameConfig's internal properties (for example mappedURL) determine what is loaded inside the associated <fencedframe>. In addition:

Remarks

-Fenced frames on privacysandbox.google.com
-The Privacy Sandbox on privacysandbox.google.com

See also on MDN

Height

NOTE
Experimental
The height property of the HTMLFencedFrameElement gets and sets the value of the corresponding {{htmlelement("fencedframe")}} height attribute, which specifies the height of the element.
[Value("height")]
public string Height { get; set; }

Property Value

string

A string representing the height of the element in CSS pixels. The default value is 150.

Remarks

The size of the embedded content may be set by internal contentWidth and contentHeight properties of the <fencedframe>'s Config object. In such cases, changing the Width or height of the <fencedframe> will change the size of the embedded container on the page, but the document inside the container will be visually scaled to fit. The reported width and height of the embedded document (i.e., InnerWidth and InnerHeight) will be unchanged.

-Fenced frames on privacysandbox.google.com
-The Privacy Sandbox on privacysandbox.google.com

See also on MDN

Sandbox

[Value("sandbox")]
public DOMTokenList Sandbox { get; }

Property Value

DOMTokenList

Width

NOTE
Experimental
The width property of the HTMLFencedFrameElement gets and sets the value of the corresponding {{htmlelement("fencedframe")}} width attribute, which specifies the width of the element.
[Value("width")]
public string Width { get; set; }

Property Value

string

A string representing the width of the element in CSS pixels. The default value is 300.

Remarks

The size of the embedded content may be set by internal contentWidth and contentHeight properties of the <fencedframe>'s Config object. In such cases, changing the width or Height of the <fencedframe> will change the size of the embedded container on the page, but the document inside the container will be visually scaled to fit. The reported width and height of the embedded document (i.e., InnerWidth and InnerHeight) will be unchanged.

-Fenced frames on privacysandbox.google.com
-The Privacy Sandbox on privacysandbox.google.com

See also on MDN