asciidoctor / asciidoctor-browser-extension

:white_circle: An extension for web browsers that converts AsciiDoc files to HTML using Asciidoctor.js.
https://chrome.google.com/webstore/detail/asciidoctorjs-live-previe/iaalpfgpbocpdfblpnhhgllgbdbchmia
MIT License
216 stars 53 forks source link

Migrate to manifest version 3 #646

Open ggrossetie opened 1 year ago

ggrossetie commented 1 year ago

https://developer.chrome.com/blog/mv2-transition/

The problem is that currently Firefox does not support background.service_worker: https://developer.chrome.com/docs/extensions/migrating/to-service-workers/. Basically, we cannot use the same manifest nor the same codebase 😞

Another potential issue is that XMLHttpRequest must be replaced by fetch: https://developer.chrome.com/docs/extensions/migrating/to-service-workers/#replace-xmlhttprequest The problem is that Asciidoctor.js processing is synchronous:

It might still be possible to use XMLHttpRequest from the page.

ggrossetie commented 1 year ago

It's still possible to upload a new version of an existing extension using manifest v2 on the Chrome WebStore. However, it's not possible on Edge:

image

ggrossetie commented 1 year ago