mirror of
https://github.com/electron/electron.git
synced 2026-01-25 15:28:11 -05:00
Cache extension metadata
This commit is contained in:
@@ -8,9 +8,13 @@ const {ipcRenderer} = require('electron')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
let metadata
|
||||
|
||||
const getExtensionMetadata = () => {
|
||||
// FIXME(kevinsawicki) Either cache this or don't use sync IPC to obtain it
|
||||
return ipcRenderer.sendSync('CHROME_I18N_MANIFEST', chrome.runtime.id)
|
||||
if (!metadata) {
|
||||
metadata = ipcRenderer.sendSync('CHROME_I18N_MANIFEST', chrome.runtime.id)
|
||||
}
|
||||
return metadata
|
||||
}
|
||||
|
||||
const getMessagesPath = (language) => {
|
||||
|
||||
Reference in New Issue
Block a user