-
Notifications
You must be signed in to change notification settings - Fork 672
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
[css-anchor-position-1] Change implicit anchor element example #9014
Conversation
@tabatkins Want to take a look? |
I don't think it should. The current PR looks more appropriate. |
css-anchor-position-1/Overview.bs
Outdated
to declare what element is anchoring it. | ||
This makes the declared element the [=implicit anchor element=] | ||
for the popover. | ||
For example, the HTML spec defines an "anchor" attribute which allows an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a link to the HTML spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to but the PR isn't merged yet: whatwg/html#9144
If that PR is merged before this one then I can edit this PR to add a link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about linking it to https://whatpr.org/html/9144/dom.html#the-anchor-attribute for now, and then change it when the HTML PR is merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
When I initially wrote it the assumption was that the anchor attribute was part of the Popover API. If it's been separated, it makes sense to rewrite to refer to this properly, so yeah, merged. (Is there no way for the JS API to trigger an implicit anchor anymore?) And I fixed the link to just be what will eventually link to HTML after the PR lands; it's okay for it to fail for a little bit rather than try to remember to change the link later. |
There is: element.anchorElement = anotherElement;
element.anchorElement; // returns anotherElement |
I knew about that one, I just thought there was a way to trigger it from the opening call. |
I am writing an HTML spec PR to define the anchor attribute, which sets the implicit anchor element. That PR doesn't have any references to or integrations with the popover attribute, and I got feedback that the implicit anchor element seems popover-specific due to the example: whatwg/html#9144 (comment)
This PR changes the example to talk about the anchor attribute rather than the popover API. I'm not sure if the popover API is supposed to set an implicit anchor element... maybe @xiaochengh knows?