PSA: DNR rules will apply to extension initiated main frame requests

ยอดดู 129 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Oliver Dunk

ยังไม่อ่าน,
9 ม.ค. 2025 12:08:369 ม.ค.
ถึง Chromium Extensions

Hi all,

Starting in Chrome 134, Declarative Net Request rules will apply to main frame requests for web resources initiated by extensions.

This includes:

  • Clicking a link to a web page on a chrome-extension:// page, including a new tab page override
  • Using the `window.open` API within an extension, or `chrome.tabs.create` with `openerTabId` set to a tab containing an extension page
  • Calls to the `chrome.tabs.update` API
This is the case even if the rules are from an extension other than the one initiating the request.

Generally, extensions are not able to act on requests made by other extensions. However, this is a case where it is desirable for the request to behave as if it was initiated by a user.

This matches the behavior of the `chrome.webRequest` API and resolves https://issues.chromium.org/382670035 - thanks to wOxxOm for the report.

Thanks,
Oliver on behalf of Chrome Extensions DevRel

woxxom

ยังไม่อ่าน,
9 ม.ค. 2025 14:00:569 ม.ค.
ถึง Chromium Extensions, Oliver Dunk
To add more context, this will match the way DNR was working before Chrome 128 introduced the regression half a year ago.

Uladzimir Yankovich

ยังไม่อ่าน,
10 ม.ค. 2025 10:01:5410 ม.ค.
ถึง Chromium Extensions, woxxom, Oliver Dunk
To be clear, will this change affect how DNR works for sub-frames (iFrames)?

woxxom

ยังไม่อ่าน,
10 ม.ค. 2025 10:04:3310 ม.ค.
ถึง Chromium Extensions, Uladzimir Yankovich, woxxom, Oliver Dunk
No. The main_frame navigation is about the tab's main document. I guess this inherently confusing term comes from the sources of chromium where everything is a frame technically.

Uladzimir Yankovich

ยังไม่อ่าน,
10 ม.ค. 2025 10:09:1810 ม.ค.
ถึง woxxom, Chromium Extensions, Oliver Dunk
Thanks a lot!


--
Uladzimir Yankovich.
ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ