UI plugin dependencies (#4307)

* Add requires field to UI plugin config
* Use defer instead of async for useScript
* Load plugins based on dependency
* Document new field
This commit is contained in:
WithoutPants
2023-11-27 13:41:04 +11:00
committed by GitHub
parent 910ff27730
commit 11be56cc42
8 changed files with 94 additions and 11 deletions

View File

@@ -42,6 +42,10 @@ type Plugin struct {
}
type PluginUI struct {
// Requires is a list of plugin IDs that this plugin depends on.
// These plugins will be loaded before this plugin.
Requires []string `json:"requires"`
// Content Security Policy configuration for the plugin.
CSP PluginCSP `json:"csp"`