-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
needs-triage: chromeChrome needs to assess this issue for the first timeChrome needs to assess this issue for the first timeneeds-triage: firefoxFirefox needs to assess this issue for the first timeFirefox needs to assess this issue for the first timeneeds-triage: safariSafari needs to assess this issue for the first timeSafari needs to assess this issue for the first timetopic: dnrRelated to declarativeNetRequestRelated to declarativeNetRequest
Description
This is useful for extensions that handle a certain MIME type via Content-Type response header (a userscript/userstyle manager, PDF, media viewer) and show their UI for the resource in a new tab or window, particularly in a simple popup window without distractions like tabs, address bar, toolbars or menus.
With webRequestBlocking it's easy: we cancel the navigation in the original tab and open a new tab/window passing the URL along.
Possible solutions for MV3 (all must require a host permission because a URL is exposed):
- Add
chrome.webRequest.onBlockedDeclarativelyevent withruleIds: [1,2,3]property added to the standard webRequest filter parameter. - Add
"blockAndNotify"or"blockAndNotifyWebRequest"to the action's type string. - Add
notifyWebRequestboolean to the rule dictionary, but it's weird because it only makes sense when blocking. - Add
openInorretargetornewTargetproperty in the "redirect" dictionary with values like "tab", "window" however it will also require chrome.declarativeNetRequest.setWindowOptions(opts) so extensions can set the position and size of the window like {type: 'popup', left: 123, top: 100, width: 500, height: 300} to avoid having a non-customizable fugly huge popup like the one opened by chrome.identity API.
Metadata
Metadata
Assignees
Labels
needs-triage: chromeChrome needs to assess this issue for the first timeChrome needs to assess this issue for the first timeneeds-triage: firefoxFirefox needs to assess this issue for the first timeFirefox needs to assess this issue for the first timeneeds-triage: safariSafari needs to assess this issue for the first timeSafari needs to assess this issue for the first timetopic: dnrRelated to declarativeNetRequestRelated to declarativeNetRequest