Auto-clean extension handlers on deactivation

- remove handlers when an extension is deactivated or removed

- make sure that the found extension when routing a request is currently
  enabled (as a backup)

- added documentation about the above behaviour to the guide

- tweaked the naming convension so that it is clearer that the router
  uses extension names as not IDs (which currently are folder paths)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2021-02-02 08:48:03 -05:00
1 parent 8430b67d55
commit e7ee7fe2b0
8 files changed
+53 -28

No files matched your search

@@ -45,3 +45,9 @@ On the other hand, the subpath `"/display/notification"` would be routed to #3.
The URI is routed to the most specific matching `pathSchema`.
This way the `"/"` (root) `pathSchema` acts as a sort of catch all or default route if no other route matches.
### Cleaning Up
Currently there is not way to remove a protocol handler once it has been registered.
Handlers will not be called if the extension is deactivated or uninstalled.
This means that the handlers should be added (or re-added as the case may be) on every activation of an extension instance.