Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's this syntax from? Is there a browser that implements it as a content-relative anchor? It looks convenient.

    #:~:text=


It's call "Text Fragments", and it was introduced to Chrome more than one year ago. https://github.com/WICG/scroll-to-text-fragment

I think it works in Chrome and Edge, but not in Firefox.


Thanks!

Indeed, it seems to be just those for now:

https://caniuse.com/url-scroll-to-text-fragment


In a Chrome browser on desktop, you can right click and "Copy Link to Highlighted Text". That's the context (hah, pun) where I know it from. It's really useful!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: