feat: webFrameMain.origin (#35624)

feat: webFrameMain.origin (#35438)

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
Milan Burda
2022-09-15 19:27:20 +02:00
committed by GitHub
parent 14c64ed2e0
commit c2d73ae79c
4 changed files with 79 additions and 11 deletions

View File

@@ -144,6 +144,16 @@ ipcRenderer.on('port', (e, msg) => {
A `string` representing the current URL of the frame.
#### `frame.origin` _Readonly_
A `string` representing the current origin of the frame, serialized according
to [RFC 6454](https://www.rfc-editor.org/rfc/rfc6454). This may be different
from the URL. For instance, if the frame is a child window opened to
`about:blank`, then `frame.origin` will return the parent frame's origin, while
`frame.url` will return the empty string. Pages without a scheme/host/port
triple origin will have the serialized origin of `"null"` (that is, the string
containing the letters n, u, l, l).
#### `frame.top` _Readonly_
A `WebFrameMain | null` representing top frame in the frame hierarchy to which `frame`