Skip to content

Conversation

@seia-soto
Copy link
Contributor

@seia-soto seia-soto commented Feb 24, 2025

Description

This adds the type of json in ResourceType from webRequest.ResourceType and declarativeNetRequest.ResourceType.

Motivation

This reflects the latest changes from Firefox source code. json is pretty broad word to use without details.

Note that it looks like not released yet, so I don't know if this is okay to go now.

Additional details

refs mozilla/gecko-dev@e6a7800
refs https://searchfox.org/mozilla-central/rev/fcfb558f8946f3648d962576125af46bf6e2910a/toolkit/components/extensions/schemas/web_request.json
refs https://searchfox.org/mozilla-central/rev/fcfb558f8946f3648d962576125af46bf6e2910a/toolkit/components/extensions/schemas/declarative_net_request.json
refs https://bugzilla.mozilla.org/show_bug.cgi?id=1858078

Related issues and pull requests

@seia-soto seia-soto requested a review from a team as a code owner February 24, 2025 09:35
@seia-soto seia-soto requested review from jpmedley and removed request for a team February 24, 2025 09:35
@github-actions github-actions bot added Content:WebExt WebExtensions docs size/xs [PR only] 0-5 LoC changed labels Feb 24, 2025
@Josh-Cena Josh-Cena requested review from rebloor and removed request for jpmedley February 25, 2025 20:02
@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2025

@rebloor
Copy link
Contributor

rebloor commented Mar 16, 2025

@seia-soto thanks for picking up this change. This should also have an entry in the release notes and an update made to the BCD.

@seia-soto
Copy link
Contributor Author

seia-soto commented Mar 17, 2025

@rebloor Thanks for picking up the places.

For browser compatibility data, I already put the issue here: mdn/browser-compat-data#26016.

However, I couldn't verify the request type existence so far on Firefox. I tried to trigger JSON module import by using both static and dynamic form, but both of webRequest.onHeaderReceived and webRequest.onBeforeRequest handler showed me a value of script on Firefox v136.

I expect this will be settled with import attribution (and here's a direct URL to the corresponding Firefox meta issue) by looking at this test code.

For Chromium, they also don't ship it yet and it looks like nothing decided in this Chromium issue.

I'll update this pull as the situation changes.

@rebloor rebloor requested a review from dotproto March 18, 2025 01:50
@rebloor
Copy link
Contributor

rebloor commented Mar 18, 2025

@dotproto know anything about this?

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Apr 10, 2025
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@dotproto
Copy link
Collaborator

@dotproto know anything about this?

Sorry for the late reply. The "json" resource type is new to me, but happy to help chase down info.

I haven't tried myself, but I think this feature should now work as expected in Firefox Nightly.

Seems mdn/browser-compat-data#26016 was closed as the feature behind the introduction of the "json" value wasn't supported. It seems the flag is being default enabled in Firefox 138, so we should be able to revisit that shortly. Also, I've added a question to the BCD ticket to clarify my understanding of the availability requirement for future reference.

@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Apr 29, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2025

Preview URLs

Flaws (1)

Note! 2 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Mozilla/Firefox/Releases/138
Title: Firefox 138 for developers
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Web/API/HTML_Sanitizer_API
External URLs (2)

URL: /en-US/docs/Mozilla/Firefox/Releases/138
Title: Firefox 138 for developers

(comment last updated: 2025-05-05 08:11:35)

@rebloor
Copy link
Contributor

rebloor commented May 5, 2025

@seia-soto we also need release notes, which are made on source/firefox/138

@seia-soto seia-soto force-pushed the add-resourcetype-json branch from ec784e9 to dbb88a6 Compare May 5, 2025 08:00
@seia-soto seia-soto requested a review from a team as a code owner May 5, 2025 08:00
@seia-soto seia-soto requested review from bsmth and removed request for a team May 5, 2025 08:00
@github-actions github-actions bot added Content:Firefox Content in the Mozilla/Firefox subtree merge conflicts 🚧 [PR only] labels May 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2025

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels May 5, 2025
@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label May 5, 2025
@seia-soto
Copy link
Contributor Author

@rebloor release note updated.

  • Accidentally rebased to seia-soto:main which is outdated not mdn:main.

Copy link
Contributor

@rebloor rebloor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @seia-soto

@rebloor rebloor merged commit f9f6cb5 into mdn:main May 6, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Firefox Content in the Mozilla/Firefox subtree Content:WebExt WebExtensions docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants