Class NotRestoredReasons
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalNotRestoredReasons 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
These objects are accessed via the NotRestoredReasons property.
Constructors
NotRestoredReasons()
public NotRestoredReasons()
Properties
Children
NOTE
Experimentalchildren read-only property of theNotRestoredReasons 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>,childrenwill returnnull.
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.
Id
NOTE
Experimentalid read-only property of theNotRestoredReasons 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 noidset,idwill returnnull.
Remarks
Name
NOTE
Experimentalname read-only property of theNotRestoredReasons 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 nonameset,namewill returnnull.
Remarks
Reasons
NOTE
Experimentalreasons read-only property of theNotRestoredReasons 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,
reasonswill returnnull, but the parent document may show areasonof"masked"if any<iframe>s blocked bfcache usage for the top-level frame.
Remarks
Src
NOTE
Experimentalsrc read-only property of theNotRestoredReasons 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>,srcwill returnnull.
Remarks
Url
NOTE
Experimentalurl read-only property of theNotRestoredReasons 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>,urlwill returnnull.
Remarks
Methods
ToJSON()
NOTE
ExperimentaltoJSON() 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.