Closed Bug 1764566 Opened 2 years ago Closed 2 years ago

Mark some tabs APIs as disabled in MV3

Categories

(WebExtensions :: General, task)

task

Tracking

(firefox101 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

(Depends on 1 open bug, Blocks 3 open bugs)

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

bug 1687762 listed some deprecated APIs, but we've only marked some APIs in the runtime/extension namespace as deprecated.

We should also ensure that the following are marked as deprecated:

  • tabs.executeScript (superseded by scripting.executeScript from bug 1735474).
  • tabs.getAllInWindow (already "unsupported", just remove it from tabs.json)
  • tabs.getSelected (already "unsupported")
  • tabs.insertCSS (superseded by scripting.insertCSS from bug 1736579).
  • tabs.removeCSS (superseded by scripting.removeCSS from bug 1736580).
  • tabs.onActiveChanged (already "unsupported").
  • tabs.onHighlightChanged (already "unsupported").
  • tabs.onSelectionChanged (already "unsupported").
  • tabs.sendRequest (already "unsupported").
  • tabs.Tab.selected (https://bugzilla.mozilla.org/show_bug.cgi?id=1687762#c1).

(this list is broader than the one from bug 1687762; I cross-checked the list with https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/extensions/api/_api_features.json;l=816-842;drc=18e72e000e8e7b1dd6b0c2413bd599a25e51c56f ).

The contentScripts and userScripts APIs should also be MV2-only eventually, but we should seek feature parity before doing that. At least by supporting cookieStoreId in the scripting.registerContentScripts/updateContentScripts APIs (bug 1764572).

See Also: → 1764572

I'll hide the contentScripts and userScripts APIs from MV3, since these APIs are not compatible with the design of event pages. Doing so addresses bug 1687780 and bug 1687782.

Blocks: 1687780, 1687782
Depends on: 1723156

They should not just be marked as deprecated, their availability should be removed from MV3.

Summary: Mark some tabs APIs as deprecated in MV3 → Mark some tabs APIs as disabled in MV3
  • Remove unsupported tabs API definitions that are gone in MV3.
  • Mark content script APIs (superseded by scripting APIs) as MV2-only.
  • Re-enable extension.getBackgroundPage in MV2 since it makes sense with
    event pages, and we enabled runtime.getBackgroundPage in bug 1759308.
  • Add tests that verify API availability in MV3.
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/0b44605d1049
Update API availability in MV3 r=mixedpuppy
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
See Also: → 1875475
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: