seleccion

WebJar for seleccion

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

seleccion
Последняя версия

Последняя версия

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

seleccion
WebJar for seleccion
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/bevacqua/seleccion

Скачать seleccion

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/seleccion/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>seleccion</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/seleccion/
implementation 'org.webjars.npm:seleccion:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/seleccion/
implementation ("org.webjars.npm:seleccion:2.0.0")
'org.webjars.npm:seleccion:jar:2.0.0'
<dependency org="org.webjars.npm" name="seleccion" rev="2.0.0">
  <artifact name="seleccion" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='seleccion', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "seleccion" % "2.0.0"
[org.webjars.npm/seleccion "2.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

seleccion

A getSelection polyfill and a setSelection ranch dressing

Includes also a setSelection method. See also sell to work with selection within <input> and <textarea> elements.

install

npm install seleccion

seleccion.get()

Provides a polyfill for window.getSelection.

var getSelection = require('seleccion').get;
var range = getSelection();
  • Defaults to window.getSelection if available
  • Falls back to document.selection
  • Falls back to a naïve null object if both are unavailable

seleccion.set(range)

Provides a convenient cross-browser method to set the text selection using a range TextRange.

var setSelection = require('seleccion').set;
setSelection({
  startContainer: document.querySelector('#some-span'),
  startOffset: 0,
  endContainer: document.querySelector('#another-span'),
  endOffset: 24,
  collapsed: false
});

license

MIT

Версии библиотеки

Версия
2.0.0