()
| 1 | const preloadMenu = async () => { |
| 2 | if (!await chrome.offscreen.hasDocument()) { |
| 3 | await chrome.offscreen.createDocument({ |
| 4 | url: "menu.html" , |
| 5 | reasons: ["LOCAL_STORAGE"], |
| 6 | justification: 'preloading a popup menu' |
| 7 | }); |
| 8 | } |
| 9 | }; |
| 10 | preloadMenu(); |
| 11 | |
| 12 |