-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add 'CSP list' to global objects. #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@annevk: Ping? :) |
|
I've been thinking about where to store state between |
|
When the A None of that tells me where we want to store this thing, because I'm not sure what it is we're storing and what it's used for. It's a list of some sort of objects, but it's not clear to me whether these are JS objects (in which case storing on the Window is likely to be the sane thing to do) or some other sort of objects. In any case, I'm 99% sure that copying it from the entry settings object is wrong, whatever it is. ;) |
We need to store this data for
These aren't (currently) JavaScript objects, they're just representations of the policy that applies to a context. That said, I'm putting together an API that will sit on top of these lists in order to expose the state of the context, however, so they will eventually be indirectly exposed to script. |
|
OK. Does the policy change when document.open() happens? Does it change when navigation from initial about:blank to a same-origin URI happens? Does it change during random DOM manipulations? Due to |
No.
Yes. It would be populated from the
If the manipulation is the addition of a
No. |
|
Can you point me to the definition of "execution context" as being used here? But in any case, given those answers hanging this off a |
I don't have a good definition. It's hand-waving on my part to describe the vague feeling that nothing interesting changes about code that's executed before and after
Happy to leave this up to @annevk. Tell me where you want stuff, and I'll give you patches. (This is somewhat related to the |
Well. The global object changes. All the stuff hanging off the global except |
|
I think we should probably continue Ian's tradition of putting state on |
|
Will rework this patch after TPAC, thanks. |
source
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs an extra newline.
|
Taken care of both nits. Happy to either squash, or to fix up other issues you find. :) |
source
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra newline needed to go below, not above :-)
With this addressed, and squashed/rebased, I think we're good.
Content Security Policy adds a new property to the global object that holds the active policy objects for a context. This patch merges this property into HTML, and initialises it whenever creating new Document and Worker objects. #271
|
Moved the newline, squished. Thanks. :) |
|
Thank you! |
I don't think that GitHub supports PRs on top of PRs, so this might be a little annoying: the only relevant patch for this PR is 2e60efb. The other patch is part of #272. Do you know of a better way to do this? I can just send one big PR with each change split out into a separate patch, but I suspect that would be frustrating to review.