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

Insert position from insertAdjacentHTML seems wrong #10725

Closed
nielsdos opened this issue Oct 26, 2024 · 2 comments · Fixed by #10729
Closed

Insert position from insertAdjacentHTML seems wrong #10725

nielsdos opened this issue Oct 26, 2024 · 2 comments · Fixed by #10729
Assignees

Comments

@nielsdos
Copy link

nielsdos commented Oct 26, 2024

What is the issue with the HTML Standard?

I'm implementing steps from https://html.spec.whatwg.org/#dom-element-insertadjacenthtml

At step 6 (Use the first matching item from this list) we see the following:

If position is an ASCII case-insensitive match for the string "afterend"

Insert fragment into this before its first child.

However, "afterend" is supposed to insert the contents after this, no?
Similarly, the step from "beforeend" seems wrong too.
Are these two swapped?

EDIT: The step for "afterbegin" seems wrong too, as it would add the new nodes after all other children.

@domenic
Copy link
Member

domenic commented Oct 28, 2024

@lukewarlow would you be able to take a look at this?

@lukewarlow
Copy link
Member

Yeah some of these do appear to have been switched around inadvertently.

@domenic domenic self-assigned this Oct 29, 2024
domenic added a commit that referenced this issue Oct 29, 2024
The operations were matched to the enum values incorrectly. Closes #10725.
domenic added a commit that referenced this issue Oct 29, 2024
The operations were matched to the enum values incorrectly. Closes #10725.
domenic added a commit that referenced this issue Oct 29, 2024
The operations were matched to the enum values incorrectly. Closes #10725.
mfreed7 pushed a commit to mfreed7/html that referenced this issue Nov 11, 2024
The operations were matched to the enum values incorrectly. Closes whatwg#10725.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants