Table of Contents

Class NotRestoredReasons

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The NotRestoredReasons interface of the {{domxref("Performance API", "Performance API", "", "nocode")}} provides report data containing reasons why the current document was blocked from using the back/forward cache (bfcache) on navigation.
[Value("NotRestoredReasons")]
public class NotRestoredReasons
Inheritance
NotRestoredReasons
Inherited Members

Remarks

Constructors

NotRestoredReasons()

public NotRestoredReasons()

Properties

Children

NOTE
Experimental
The children read-only property of the
NotRestoredReasons interface returns an array of NotRestoredReasons objects, one for each child {{htmlelement("iframe")}} embedded in the current document, which may contain reasons why the top-level frame was blocked relating to the child frames.
[Value("children")]
public NotRestoredReasons[]? Children { get; }

Property Value

NotRestoredReasons[]

An array of NotRestoredReasons objects.If the frame has no children, the array will be empty; if the document is in a cross-origin <iframe>, children will return null.

Remarks

Each object has the same structure as the parent object — this way, any number of levels of embedded <iframe>s can be represented inside the object recursively.

-Monitoring bfcache blocking reasons
-NotRestoredReasons

See also on MDN

Id

NOTE
Experimental
The id read-only property of the
NotRestoredReasons interface returns a string representing the id attribute value of the iframe the document is contained in (for example <iframe id="foo" src="...">).
[Value("id")]
public string? Id { get; }

Property Value

string

A string.If the document is not in an <iframe> or the <iframe> has no id set, id will return null.

Remarks

Name

NOTE
Experimental
The name read-only property of the
NotRestoredReasons interface returns a string representing the name attribute value of the iframe the document is contained in (for example <iframe name="bar" src="...">).
[Value("name")]
public string? Name { get; }

Property Value

string

A string.If the document is not in an <iframe> or the <iframe> has no name set, name will return null.

Remarks

Reasons

NOTE
Experimental
The reasons read-only property of the
NotRestoredReasons interface returns an array of NotRestoredReasonDetails objects, each representing a reason why the navigated page was blocked from using the back/forward cache ({{Glossary("bfcache")}}).
[Value("reasons")]
public NotRestoredReasonDetails[]? Reasons { get; }

Property Value

NotRestoredReasonDetails[]

An array of NotRestoredReasonDetails objects. See Blocking reasons for a list of the possible blocking reasons.If the document is in a cross-origin iframe, reasons will return null, but the parent document may show a reason of "masked" if any <iframe>s blocked bfcache usage for the top-level frame.

Remarks

Src

NOTE
Experimental
The src read-only property of the
NotRestoredReasons interface returns a string representing the path to the source of the {{htmlelement("iframe")}} the document is contained in (for example <iframe src="b.html">).
[Value("src")]
public string? Src { get; }

Property Value

string

A string.If the document is not in an <iframe>, src will return null.

Remarks

Url

NOTE
Experimental
The url read-only property of the
NotRestoredReasons interface returns a string representing the URL of the navigated page or {{htmlelement("iframe")}}.
[Value("url")]
public string? Url { get; }

Property Value

string

A string.If the document is in a cross-origin <iframe>, url will return null.

Remarks

Methods

ToJSON()

NOTE
Experimental
The toJSON() method of the NotRestoredReasons interface is a {{Glossary("Serialization","serializer")}}; it returns a JSON representation of the NotRestoredReasons object.
[Value("toJSON")]
public Object ToJSON()

Returns

Object

A {{jsxref("JSON")}} object that is the serialization of the NotRestoredReasons object.

Remarks