-
Notifications
You must be signed in to change notification settings - Fork 66
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
Load events across portals #26
Comments
We should also think about whether the portal element should delay the load event of its containing document. The spec mentions that <iframe>s should delay the load event until they are ready for post-load tasks (https://html.spec.whatwg.org/#the-iframe-element:delay-the-load-event). |
Have any recent course corrections changed our decision here, or do we still think a load event is valuable? I'd be inclined to imitate iframes, in general. |
The Chromium implementation does have a |
Is it OK to communicate cross-origin load? |
We do for iframes. And I think #191 makes a compelling point that it's difficult to hold properly without some basic signals about the readiness of the content. |
Although iframes wouldn't be first-party, and portals might be. Providing the load event of a first-party page would be a new capability that we should probably avoid. |
Fair point. Popups probably still do as well, but maybe given the direction frames are going we should either not fire this, or restrict it to same-origin. We'd previously found it rather inconvenient to know when you could start talking to a portal contents via postMessage (plumbing your own ready message works but gets old quickly, and it's also kinda nice to be able to delay the outer load). But those concerns apply more acutely to portals with which you are permitted to coordinate, so maybe this should be re-evaluated. |
Adding "design work needed" since it sounds like we're not sure whether this should be fired for cross-origin portals... I guess I can still work on a spec PR though that fires it at all times, and we could restrict it later. |
I put up a draft for firing the load event. How do we feel about delaying the load event of the outer document? I'm not sure what the load event is used for these days, so it's hard to say whether it's worth the complexity... I guess I use it when writing tests sometimes. |
I don't feel strongly, but if I were an author I think I would expect it to behave similarly to images, frames, etc. |
We need a way to synchronize events between the embedder and the portal. This could be done with a load event on the portal element that notifies the embedder that the portal has completed loading.
The text was updated successfully, but these errors were encountered: