Set appropriate defaults for webview options (#12271)
* Persist defaults to webPreferences object to JS land can read the inferred values instead of just user defined values * Test inherited default propogation * Refactor to remove coupling from fetching values and defaults * Test description type * Fix up tests
This commit is contained in:
parent
f54c94d6c9
commit
c2673aa970
11 changed files with 110 additions and 11 deletions
|
@ -156,7 +156,7 @@ const createGuest = function (embedder, params) {
|
|||
// Forward internal web contents event to embedder to handle
|
||||
// native window.open setup
|
||||
guest.on('-add-new-contents', (...args) => {
|
||||
if (guest.getWebPreferences().nativeWindowOpen === true) {
|
||||
if (guest.getLastWebPreferences().nativeWindowOpen === true) {
|
||||
const embedder = getEmbedder(guestInstanceId)
|
||||
if (embedder != null) {
|
||||
embedder.emit('-add-new-contents', ...args)
|
||||
|
@ -164,7 +164,7 @@ const createGuest = function (embedder, params) {
|
|||
}
|
||||
})
|
||||
guest.on('-web-contents-created', (...args) => {
|
||||
if (guest.getWebPreferences().nativeWindowOpen === true) {
|
||||
if (guest.getLastWebPreferences().nativeWindowOpen === true) {
|
||||
const embedder = getEmbedder(guestInstanceId)
|
||||
if (embedder != null) {
|
||||
embedder.emit('-web-contents-created', ...args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue