Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit 11017dc

Browse files
committed
Update LifespanHandler.md document. Info on OnBeforePopup and scripting
between popup and parent window. (cztomczak#171)
1 parent a5d97f0 commit 11017dc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

api/LifespanHandler.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ Description from upstream CEF:
107107
> browser is destroyed before the popup browser creation completes (indicated
108108
> by a call to OnAfterCreated for the popup browser).
109109
110-
Note that if you return True and create the popup window yourself, then
111-
the popup window and parent window will not be able to script each other.
112-
There will be no "window.opener" property available in the popup window.
113-
114110
`WindowOpenDisposition` constants in the cefpython module:
115111
* WOD_UNKNOWN,
116112
* WOD_CURRENT_TAB,
@@ -122,3 +118,11 @@ There will be no "window.opener" property available in the popup window.
122118
* WOD_SAVE_TO_DISK,
123119
* WOD_OFF_THE_RECORD,
124120
* WOD_IGNORE_ACTION
121+
122+
Note that if you return True and create the popup window yourself, then
123+
the popup window and parent window will not be able to script each other.
124+
There will be no "window.opener" property available in the popup window.
125+
To avoid this issue create a hidden window when your application starts.
126+
Parent the new popup browser to the hidden window in OnBeforePopup. After
127+
the browser exists (OnAfterCreated) create the desired target window
128+
and re-parent the browser to that target window.

0 commit comments

Comments
 (0)