Skip to content

Commit f372641

Browse files
authored
Merge pull request #975 from carlosjeurissen/oninvalidated-changes
Update `runtime.onInvalidated` with unload reason and isolated world restriction
2 parents d11c694 + 0648711 commit f372641

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

proposals/runtime_on_invalidated.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ OnInvalidatedReason:
7878
"type": "string",
7979
"enum": [
8080
{"name": "uninstall", "description": "Specifies the event reason as an uninstallation."},
81-
{"name": "update", "description": "Specifies the event reason as an extension update."},
82-
{"name": "reload", "description": "Specifies the event reason as an extension reloading."},
83-
{"name": "disable", "description": "Specifies the event reason as an extension disabling."}
81+
{"name": "unload", "description": "Specifies the event reason as an extension unload (like extension updates, reloads, and disabling)."}
8482
],
8583
"description": "The reason that this event is being dispatched."
8684
}
8785
```
8886

87+
The API should only be exposed to isolated content script worlds.
88+
8989
### Behavior
9090

9191
The event will be fired when the extension context get invalidated while the
@@ -151,6 +151,9 @@ There is no viable path to turn this into an Open Web API.
151151
The event should be fired in the situation in which extension APIs would throw
152152
with an context invalidated error.
153153

154+
For this to work, browsers need to keep the content script context alive for
155+
the extension to handle the invalidation event.
156+
154157
## Future Work
155158

156159
Not at this moment

0 commit comments

Comments
 (0)