Sandbox: Make jquery available to plugins in the global scope (#75960)
This commit is contained in:
@@ -94,6 +94,12 @@ async function doImportPluginModuleInSandbox(meta: PluginMeta): Promise<System.M
|
||||
// Similar to `window.monaco`, `window.Prism` may be undefined when invoked.
|
||||
return Reflect.get(window, 'Prism');
|
||||
},
|
||||
get jQuery() {
|
||||
return Reflect.get(window, 'jQuery');
|
||||
},
|
||||
get $() {
|
||||
return Reflect.get(window, 'jQuery');
|
||||
},
|
||||
get grafanaBootData(): BootData {
|
||||
if (!pluginLogCache[meta.id + '-grafanaBootData']) {
|
||||
pluginLogCache[meta.id + '-grafanaBootData'] = true;
|
||||
|
||||
Reference in New Issue
Block a user