feat: [extensions] support extension.getBackgroundPage (#21951)
* feat: [extensions] support extension.getBackgroundPage * cleanup * how does c++ * tests * test for runtime.getBackgroundPage too
This commit is contained in:
parent
eca1dd7f8b
commit
9107157073
16 changed files with 217 additions and 23 deletions
|
@ -9,6 +9,10 @@
|
|||
"extension_types": ["extension"],
|
||||
"contexts": ["blessed_extension"]
|
||||
},
|
||||
"extension.getBackgroundPage": {
|
||||
"contexts": ["blessed_extension"],
|
||||
"disallow_for_service_workers": true
|
||||
},
|
||||
"extension.getURL": {
|
||||
"contexts": ["blessed_extension", "unblessed_extension", "content_script"]
|
||||
}
|
||||
|
|
|
@ -12,6 +12,20 @@
|
|||
"properties": {
|
||||
},
|
||||
"functions": [
|
||||
{
|
||||
"name": "getBackgroundPage",
|
||||
"nocompile": true,
|
||||
"type": "function",
|
||||
"description": "Returns the JavaScript 'window' object for the background page running inside the current extension. Returns null if the extension has no background page.",
|
||||
"parameters": [],
|
||||
"returns": {
|
||||
"type": "object",
|
||||
"optional": true,
|
||||
"name": "backgroundPageGlobal",
|
||||
"isInstanceOf": "Window",
|
||||
"additionalProperties": { "type": "any" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "getURL",
|
||||
"deprecated": "Please use $(ref:runtime.getURL).",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[
|
||||
{
|
||||
"namespace": "tabs",
|
||||
"description": "Use the <code>chrome.tabs</code> API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser.",
|
||||
"functions": [
|
||||
{
|
||||
"name": "executeScript",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue