ContentPerformancePolicy icon indicating copy to clipboard operation
ContentPerformancePolicy copied to clipboard

How do directives impact sub-frames?

Open RByers opened this issue 10 years ago • 2 comments

If a directive (say passive-events-only) is specified on the root document, when does it also apply to sub documents? There are definitely cases where the main document will want to recursively enable the policy for all sub resources. But can that be fixed per directive, or does the language need a way to indicate the desire?

RByers avatar Feb 25 '16 01:02 RByers

I was thinking of recursively applying the directives on sub-frames, at least by default.

Are there cases where you think an author would want to opt-out sub-frames from the restrictions that they impose on the main frame?

yoavweiss avatar Feb 25 '16 11:02 yoavweiss

There are lots of composition scenarios where you're not in a position to heavily restrict what your iframes do. Eg. with any ad network it's virtually impossible for a publisher to reason about the constraints the code in the ad frame can safely be put under (eg. read-write-batching, passive listeners, etc.). Of course we need to fix that, but seems like it's a bit of a different problem.

RByers avatar Feb 25 '16 18:02 RByers