DEV Community

Cover image for Browser Selection API ๐Ÿ“
Saakshi Raut (She/Her)
Saakshi Raut (She/Her)

Posted on

Browser Selection API ๐Ÿ“

This is a submission for DEV Challenge v24.03.20, One Byte Explainer: Browser API or Feature.

Explainer

It allows you to select the text you can see on the site. While selecting text, we have the beginning of text, called the anchor, and the end, called the focus. You might need this when you have to copy and paste answers for a lengthy school assignment. :P

Additional Context

One more example for someone who didn't get it ;)
Suppose you are given an office task to gather info regarding 1000 companies. A smart kid like me would visit the site's โ€˜Aboutโ€™, select the text, copy it, and paste it. Else youโ€™d have to write the entire text if the selection API did not exist.

Top comments (0)