refactor: use getWebPreference() for all options (#26531)
This commit is contained in:
parent
854d2b1574
commit
6932e02eb8
7 changed files with 20 additions and 51 deletions
|
@ -276,7 +276,7 @@ const watchEmbedder = function (embedder: Electron.WebContents) {
|
|||
|
||||
const isWebViewTagEnabledCache = new WeakMap();
|
||||
|
||||
export const isWebViewTagEnabled = function (contents: Electron.WebContents) {
|
||||
const isWebViewTagEnabled = function (contents: Electron.WebContents) {
|
||||
if (!isWebViewTagEnabledCache.has(contents)) {
|
||||
const webPreferences = contents.getLastWebPreferences() || {};
|
||||
isWebViewTagEnabledCache.set(contents, !!webPreferences.webviewTag);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue