value="B" id="popup-B"> <label for="popup-B">Popup B</label> <button type="button" id="save">Save</button> </form> </body> </html> // options.js // Save the popup value to the storage document.getElementById("save").addEventListener("click", function() { var popup = ...
background.jsで画像データを取得し、データURLに変換できたので、あとはcontent_scriptsでimgを作成するだけです。 sendMessageの第2引数にbackground.jsから帰ってきたデータURLをimgタグに変換する処理を書いてあげれば完成です。 chrome.runtime.sendMessage({url:url},(response)=>{conste=newIma...