-
Notifications
You must be signed in to change notification settings - Fork 313
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
object/embed #249
Comments
If |
We can overcome this if we ignore type from the server and go with the type set on the element (with something like text/plain as a default). Nasty little change in behaviour, but can't think of another way. I guess this would have to apply to all objects/embeds on controlled pages. |
@annevk, can you briefly describe the case(s) where an object/embed results in a new browsing context? |
@michael-nordman, if you load an SVG resource for instance. See the HTML standard for all the details. |
Looks like http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#the-embed-element-setup-steps and http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#object-type-detection have the details. For appcache, it says,
(I haven't found the normative wording corresponding to that note.) For service workers, would it make sense to do that double-fetch too? Alternately, could it make sense to treat |
Hah, of course, app cache would have the same problem. It's a horrible hack, but if the plumbing is already there in the spec, we may as well use as much of it as we can. So:
We don't allow you to provide a non-redirect OpaqueResponse to a new-client request, as that would give you a shot at the resources within, and those request objects violate the opaqueness. Also, if you visit jakearchibald.com and I have a SW and include a context-making embed to google.com, but satisfy that response with something I create myself, do I now have script access to google.com? [1] @annevk pointed out that it's not just navigations that "select" a SW registration to use, as shared workers do too |
If the initiator may allow a plugin to handle the response, it should be requested with the skip service worker flag, as should any requests made by those plugins. Flash gets its security origin from its own url, so we can't let the page's ServiceWorker handle it. As for subresources, stuff like We should avoid SW+plugins for now, and we can spec how to handle individual plugins once we fully understand the security implications. Or hey, maybe plugins will die before we get there |
That means we need to special case requests whose context is |
Avoiding SW interactions with plugins for now sounds reasonable. |
Special cased embed and object contexts in Handle Fetch for now: a05e8d8. |
Note that this affects more than plugins. |
I think we can close this issue for now. |
Why? Don't we ever want to address this? |
I thought returning null for potential client requests in Handle Fetch makes sense, and we didn't come up with any further discussion for that. Let's think about that then. Re-opening. |
We should perhaps introduce attributes in HTML that lock these elements to being either a browsing context or embedding context (upon insertion or some such) and then service workers can work with them. |
I think the type attr can do that? On Thu, 12 Mar 2015 15:34 Anne van Kesteren notifications@github.com
|
For |
To clarify - there is currently no way for a SW to serve a swf file that is defined as the |
Correct. |
Iframe is definitely the closest thing right now. Although Can you go into a bit more details in terms of why |
The root cause is for the existing contents. I assume an EPUB reading system. Quite a lot of EPUB files use object to load SVG. |
We can only solve this if we know in advance whether the However, if you're saying that this problem only exists when existing contents cannot be changed, then there's no point us fixing it, as it would still depend on existing content changing. |
Thank you, I've understood the difficulty. Just on the use case I assumed, most of That said, I will consider the way to modify contents with iframe. |
It seems that
Does that change the situation for this issue? Also related is the YouTube |
Depending on the response, object/embed either create a browsing context or are embedding elements.
Service workers do not allow for this design as elements that create nested browsing contexts would always go through their own service worker.
Therefore these elements either become wormholes or will never be able to create a nested browsing context once you active a service worker.
This seems bad.
The text was updated successfully, but these errors were encountered: