chore: disable JS impl when //extensions support is on (#19512)
This commit is contained in:
parent
a5f87cee6b
commit
c71cdce0b7
9 changed files with 50 additions and 9 deletions
|
@ -116,7 +116,9 @@ switch (window.location.protocol) {
|
|||
}
|
||||
case 'chrome-extension:': {
|
||||
// Inject the chrome.* APIs that chrome extensions require
|
||||
require('@electron/internal/renderer/chrome-api').injectTo(window.location.hostname, window)
|
||||
if (!process.electronBinding('features').isExtensionsEnabled()) {
|
||||
require('@electron/internal/renderer/chrome-api').injectTo(window.location.hostname, window)
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'chrome': {
|
||||
|
@ -124,7 +126,9 @@ switch (window.location.protocol) {
|
|||
}
|
||||
default: {
|
||||
// Inject content scripts.
|
||||
require('@electron/internal/renderer/content-scripts-injector')(contentScripts)
|
||||
if (!process.electronBinding('features').isExtensionsEnabled()) {
|
||||
require('@electron/internal/renderer/content-scripts-injector')(contentScripts)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue