-
Notifications
You must be signed in to change notification settings - Fork 312
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
consider how clients.claim() should work with srcdoc iframes #1093
Comments
I think so. Does the srcdoc client inherit the client url from the parent? If so, it should just work. |
No. I think the srcdoc client.url should be 'about:blank'. |
I think it's 'about:srcdoc'. I agree 'clients.claim()' should also claim the child iframes that inherited the parent's controller. |
Oh, so it is. A dynamically created iframe with no src or srcdoc has a URL of about:blank. In any case, the explicit inheritance needs to be spec'd here since the URL matching won't work. |
Blob URL iframes may be an issue as well. And blob URL dedicated workers. |
|
I wonder if I'm hitting this. I'm trying to rewrite https://thimble.mozilla.org to use SW for serving all user generated content. I currently do it with Blob URLs and rewriting of relative path URLs to Blob URLs, but it can't handle things like JS dynamically doing things. Given a page running on <html>
<head>
<title>This will load in the iframe</title>
<base href="http://localhost:8000/dist/vfs">
</head>
<body>
<img src="http://localhost:8000/dist/vfs/image.png">
</body>
</html> I then add When the iframe loads, I get At first I assumed it was something else I was doing, but I now suspect the fact that it's running in a page via the Blob URL. I had hoped that by it being a child iframe, and setting the I'm thinking I should abandon the Blob URL for the iframe as well, and also load that from cache; it was just surprising to me that this didn't work, and I wanted to investigate. Thanks for any thoughts, even if only to tell me that I'm wrong. |
Currently the spec says that srcdoc iframes should inherit their parent's controlling service worker. When a window client is controlled via clients.claim(), should we also claim any immediate child srcdoc iframes?
The text was updated successfully, but these errors were encountered: