A RetroSearch Logo

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

Search Query:

Showing content from https://webplatform.github.io/docs/dom/Element/createControlRange below:

createControlRange ยท WebPlatform Docs

createControlRange

Method of dom/Elementdom/Element

Syntax
var object = object.createControlRange();
Return Value

Returns an object of type DOM NodeDOM Node

Object

Returns a controlRange collection if sucessful or a null value otherwise.

Examples

This example creates a controlRange by using the createControlRange method.

oControlRange = document.body.createControlRange();
Notes Remarks

Creates a selection range object for control-based selection rather than text-based selection. If a controlRange already exists, createControlRange overwrites the existing element; otherwise, it returns a pointer to the element created. If there are currently controls selected in the text container, the control range is initialized with them; otherwise, it is created empty and controls need to be explicitly added to it. This is opposite of the text range, which defaults to the whole text container if there is no selection.

Syntax Standards information

There are no standards that apply here.

See also Related pages 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