seleccion

WebJar for seleccion

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-bevacqua-seleccion
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

seleccion
WebJar for seleccion
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/bevacqua/seleccion

Download github-com-bevacqua-seleccion

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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

Versions

Version
2.0.0