Skip to content

Manifest V3 support? scripting.registerContentScripts #11

@fregante

Description

@fregante

chrome.scripting.registerContentScripts is coming in Manifest V3, but it won't be available on Manifest V2

Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1054624

Details: https://docs.google.com/document/d/1nRJ6iW-W1MVSpJnQzNrRQFLMsr0RycwsNym06TD5i18/edit

Once the API is finalized I'll have to figure out which way to go:

  • continue polyfilling contentScripts.register in Chrome, but with this new API
  • polyfill the new chrome API in Firefox and Safari
  • deprecate both and just suggest people to use something like:
     if (chrome.scripting?.registerContentScripts) {
     	chrome.scripting.registerContentScripts(details)
     } else if (browser?.contentScripts?.register) {
     	browser. contentScripts.register(details)
     } else {
     	throw new Error('Tough luck')
     }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions