A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/Window/getSelection below:

getSelection ยท WebPlatform Docs

getSelection Summary

Returns a Selection object that represents the current selection of the document.

Method of dom/Windowdom/Window

Syntax
var selection = window.getSelection();
Return Value

Returns an object of type ObjectObject

A Selection object that represents the currently selected text in the window.

Examples
function foo() {
    var selObj = window.getSelection();
    alert(selObj);
    var selRange = selObj.getRangeAt(0);
    
}
Standards information Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4