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

Define "strip the fragment directive" generically, without the extra Document steps #198

Closed
tabatkins opened this issue Dec 1, 2022 · 1 comment · Fixed by #201
Closed

Comments

@tabatkins
Copy link
Collaborator

I'm defining how fragment-only CSS urls (like url(#foo)) work, and need to get the fragment so I can search for a matching ID in the tree. If the url is #foo:~:text=foo, presumably I want to strip the directive and just search for "foo" as the ID, but the spec doesn't currently define a generic algorithm allowing me to do this; it bundles this behavior into also updating some Document state.

Could I get that algo abstracted out, so it takes a raw fragment string and returns a pair of (fragment, directive) strings?

@bokand
Copy link
Collaborator

bokand commented Dec 1, 2022

Yeah, that makes sense. I'm going to be upstreaming the spec as part of #195 so I'll make sure I do that as part of that work. I'm hoping to work on that this month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants