ユーザ用ツール

サイト用ツール


13_javascript:02_chrome:03_manifetst_v3

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
13_javascript:02_chrome:03_manifetst_v3 [2022/04/02 01:05] – 作成 matsui13_javascript:02_chrome:03_manifetst_v3 [2022/04/02 01:39] (現在) matsui
行 1: 行 1:
 ====== 03 Chrome拡張機能 Manifest V3 ====== ====== 03 Chrome拡張機能 Manifest V3 ======
 +
 +Manifest V2が2023年以降は利用できなくなるので、エラーがでます。
 +その為Manifest V3へ対応方法
  
 [[13_javascript:02_chrome:02_hello_world2]] をManifest V3に対応させてみる [[13_javascript:02_chrome:02_hello_world2]] をManifest V3に対応させてみる
行 37: 行 40:
  
 <code> <code>
-chrome.runtime.onMessage.addListener(async function ( +chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
-  message, +
-  sender, +
-  sendResponse +
-) { +
-  console.log("受信");+
   if (message == "Action") {   if (message == "Action") {
       hogehoge();       hogehoge();
行 56: 行 54:
  
 ===== Error ===== ===== Error =====
 +
 +==== Error1 ====
 +
 +これが、Manifest V2がサポート終了である旨のえらー
 +  Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.
 +
 +
 +==== Error2 ====
 +
 +Manifest V3以降後のmessageのresponse関連のエラー
  
 このメッセージは、送られたmessegeがレスポンスを受け取って、返す前にmessageがcloseされてしまっているようです。 このメッセージは、送られたmessegeがレスポンスを受け取って、返す前にmessageがcloseされてしまっているようです。
13_javascript/02_chrome/03_manifetst_v3.1648861555.txt.gz · 最終更新: 2022/04/02 01:05 by matsui