In addition to excludedInitiatorDomains (and initiatorDomains). Having excludedTopFrameDomains (and topFrameDomains) would solve the problem of excluding (or including) requests based specifically on the top-level document's domain, not the initiator's (immediate parent frame's) domain.
excludedTopFrameDomains will work just like excludedInitiatorDomains with the one difference being that excludedTopFrameDomains compares against the top-level frame's domain instead of the immediate parent frame's domain.
Developers should be able to feature detect the availability of excludedTopFrameDomains, so that they can use it when it is available and fall back on excludedInitiatorDomains otherwise.
For a real world example of what this would solve, see EFForg/privacybadger#3048 (comment)
In addition to
excludedInitiatorDomains(andinitiatorDomains). HavingexcludedTopFrameDomains(andtopFrameDomains) would solve the problem of excluding (or including) requests based specifically on the top-level document's domain, not the initiator's (immediate parent frame's) domain.excludedTopFrameDomainswill work just likeexcludedInitiatorDomainswith the one difference being thatexcludedTopFrameDomainscompares against the top-level frame's domain instead of the immediate parent frame's domain.Developers should be able to feature detect the availability of
excludedTopFrameDomains, so that they can use it when it is available and fall back onexcludedInitiatorDomainsotherwise.For a real world example of what this would solve, see EFForg/privacybadger#3048 (comment)