Skip to content
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

Iframe insertion steps violate rules for what insertion steps are allowed to do #10828

Closed
jdm opened this issue Dec 6, 2024 · 3 comments · Fixed by #10840
Closed

Iframe insertion steps violate rules for what insertion steps are allowed to do #10828

jdm opened this issue Dec 6, 2024 · 3 comments · Fixed by #10840
Assignees
Labels
integration Better coordination across standards needed

Comments

@jdm
Copy link
Member

jdm commented Dec 6, 2024

What is the issue with the HTML Standard?

https://html.spec.whatwg.org/multipage/#the-iframe-element:html-element-insertion-steps says: "Create a new child navigable for insertedNode." That algorithm contains "Let browsingContext and document be the result of creating a new browsing context and document".

Meanwhile, https://dom.spec.whatwg.org/#concept-node-insert-ext explicitly calls out that insertion steps must not create new browsing contexts.

@jdm
Copy link
Member Author

jdm commented Dec 6, 2024

The insertion steps also handle the about:blank case which involves firing events, which is another forbidden activity during insertion steps.

@noamr
Copy link
Contributor

noamr commented Dec 6, 2024

It's true but it's also an old backwards compat thing.
I wonder though why the iframe steps are not in "becomes connected", the insertion steps don't seem like the right spot to load iframe contents.

@domfarolino
Copy link
Member

Actually I don’t think this one’s a backward compat thing. Chromium behaves according to the requirements DOM lays out, I think this is just a place in HTML that I forgot to update when creating the post-connection steps. I’ll investigate other browsers and proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Better coordination across standards needed
Development

Successfully merging a pull request may close this issue.

4 participants