共用方式為


CoreWebView2FrameInfo Class

Provides a set of properties for a frame in the CoreWebView2.

Summary

Members Description
FrameId The unique identifier of the frame associated with the current CoreWebView2FrameInfo. It's the same kind of ID as with the CoreWebView2.FrameId and CoreWebView2Frame.FrameId. FrameId will only be populated when obtained calling CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos. CoreWebView2FrameInfo objects obtained via CoreWebView2.ProcessFailed will always have an invalid frame Id 0.
FrameKind Gets the kind of the frame. FrameKind will only be populated when obtained calling CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos. CoreWebView2ProcessExtendedInfo.CoreWebView2FrameInfo objects obtained via CoreWebView2.ProcessFailed will always have the default value CoreWebView2FrameKind.Other.
Name Gets the value of frame's window.name property. The default value equals to frame html tag declaring it, as in <iframe name="frame-name" ...>.
ParentFrameInfo This parent frame's CoreWebView2FrameInfo. ParentFrameInfo will only be populated when obtained via calling CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos. CoreWebView2FrameInfo objects obtained via CoreWebView2.ProcessFailed will always have a null ParentFrameInfo. This property is also null for the top most document in the CoreWebView2 which has no parent frame.
Source The URI of the document in the frame.

Properties

FrameId

readonly uint32_t FrameId

The unique identifier of the frame associated with the current CoreWebView2FrameInfo. It's the same kind of ID as with the CoreWebView2.FrameId and CoreWebView2Frame.FrameId. FrameId will only be populated when obtained calling CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos. CoreWebView2FrameInfo objects obtained via CoreWebView2.ProcessFailed will always have an invalid frame Id 0. FrameId could be out of date as it's a snapshot. If there's CoreWebView2 created or destroyed or CoreWebView2.FrameCreated event or CoreWebView2Frame.Destroyed event after the asynchronous call CoreWebView2Environment.GetProcessExtendedInfosAsync starts, you may want to call the asynchronous method again to get the updated CoreWebView2FrameInfo s.

FrameKind

readonly CoreWebView2FrameKind FrameKind

Gets the kind of the frame. FrameKind will only be populated when obtained calling CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos. CoreWebView2ProcessExtendedInfo.CoreWebView2FrameInfo objects obtained via CoreWebView2.ProcessFailed will always have the default value CoreWebView2FrameKind.Other. FrameKind could be out of date as it's a snapshot.

Name

readonly string Name

Gets the value of frame's window.name property. The default value equals to frame html tag declaring it, as in <iframe name="frame-name" ...>. The returned string is empty when the frame has no name attribute and no assigned value for window.name.

ParentFrameInfo

readonly CoreWebView2FrameInfo ParentFrameInfo

This parent frame's CoreWebView2FrameInfo. ParentFrameInfo will only be populated when obtained via calling CoreWebView2ProcessExtendedInfo.AssociatedFrameInfos. CoreWebView2FrameInfo objects obtained via CoreWebView2.ProcessFailed will always have a null ParentFrameInfo. This property is also null for the top most document in the CoreWebView2 which has no parent frame. ParentFrameInfo could be out of date as it's a snapshot.

Source

readonly string Source

The URI of the document in the frame.

Referenced by