DocumentSelection (engine/model)
@ckeditor/ckeditor5-engine/src/model/documentselection
DocumentSelection
is a special selection which is used as the
document's selection.
There can be only one instance of DocumentSelection
per document.
Document selection can only be changed by using the Writer
instance
inside the change()
block, as it provides a secure way to modify model.
DocumentSelection
is automatically updated upon changes in the document
to always contain valid ranges. Its attributes are inherited from the text unless set explicitly.
Differences between Selection
and DocumentSelection
are:
- there is always a range in
DocumentSelection
- even if no ranges were added there is a "default range" present in the selection, - ranges added to this selection updates automatically when the document changes,
- attributes of
DocumentSelection
are updated automatically according to selection ranges.
Since DocumentSelection
uses live ranges
and is updated when document
changes, it cannot be set on nodes
that are inside document fragment.
If you need to represent a selection in document fragment,
use Selection class instead.
Filtering
Properties
-
Selection anchor. Anchor may be described as a position where the most recent part of the selection starts. Together with
focus
they define the direction of selection, which is important when expanding/shrinking selection. Anchor is always start or end position of the most recently added range.Is set to
null
if there are no ranges in selection. -
Selection focus. Focus is a position where the selection ends.
Is set to
null
if there are no ranges in selection. -
Describes whether
Documentselection
has own range(s) set, or if it is defaulted to document's default range. -
-
Describes whether the selection is collapsed. Selection is collapsed when there is exactly one range which is collapsed.
-
readonly
isGravityOverridden : boolean
module:engine/model/documentselection~DocumentSelection#isGravityOverridden
Describes whether the gravity is overridden (using
overrideSelectionGravity
) or not.Note that the gravity remains overridden as long as will not be restored the same number of times as it was overridden.
-
readonly
markers : Collection<Marker>
module:engine/model/documentselection~DocumentSelection#markers
A collection of selection markers. Marker is a selection marker when selection range is inside the marker range.
Note: Only markers from observed markers groups are collected.
-
Number of ranges in selection.
-
internal readonly
_ranges : Array<Range>
module:engine/model/documentselection~DocumentSelection#_ranges
Used for the compatibility with the
isEqual
method. -
private
_selection : LiveSelection
module:engine/model/documentselection~DocumentSelection#_selection
Selection used internally by that class (
DocumentSelection
is a proxy to that selection).
Methods
-
constructor( doc )
module:engine/model/documentselection~DocumentSelection#constructor
-
containsEntireContent( element ) → boolean
module:engine/model/documentselection~DocumentSelection#containsEntireContent
Checks whether the selection contains the entire content of the given element. This means that selection must start at a position touching the element's start and ends at position touching the element's end.
By default, this method will check whether the entire content of the selection's current root is selected. Useful to check if e.g. the user has just pressed Ctrl + A.
Parameters
element : Element
Returns
boolean
-
inherited
delegate( events ) → EmitterMixinDelegateChain
module:engine/model/documentselection~DocumentSelection#delegate
Delegates selected events to another
Emitter
. For instance:emitterA.delegate( 'eventX' ).to( emitterB ); emitterA.delegate( 'eventX', 'eventY' ).to( emitterC );
then
eventX
is delegated (fired by)emitterB
andemitterC
along withdata
:emitterA.fire( 'eventX', data );
and
eventY
is delegated (fired by)emitterC
along withdata
:emitterA.fire( 'eventY', data );
Parameters
events : Array<string>
Event names that will be delegated to another emitter.
Returns
-
destroy() → void
module:engine/model/documentselection~DocumentSelection#destroy
-
inherited
fire( eventOrInfo, args ) → GetEventInfo<TEvent>[ 'return' ]
module:engine/model/documentselection~DocumentSelection#fire
Fires an event, executing all callbacks registered for it.
The first parameter passed to callbacks is an
EventInfo
object, followed by the optionalargs
provided in thefire()
method call.Type parameters
Parameters
eventOrInfo : GetNameOrEventInfo<TEvent>
The name of the event or
EventInfo
object if event is delegated.args : TEvent[ 'args' ]
Additional arguments to be passed to the callbacks.
Returns
GetEventInfo<TEvent>[ 'return' ]
By default the method returns
undefined
. However, the return value can be changed by listeners through modification of theevt.return
's property (the event info is the first param of every callback).
-
getAttribute( key ) → unknown
module:engine/model/documentselection~DocumentSelection#getAttribute
Gets an attribute value for given key or
undefined
if that attribute is not set on the selection.Parameters
key : string
Key of attribute to look for.
Returns
unknown
Attribute value or
undefined
.
-
getAttributeKeys() → IterableIterator<string>
module:engine/model/documentselection~DocumentSelection#getAttributeKeys
Returns iterable that iterates over this selection's attribute keys.
Returns
IterableIterator<string>
-
getAttributes() → IterableIterator<tuple>
module:engine/model/documentselection~DocumentSelection#getAttributes
Returns iterable that iterates over this selection's attributes.
Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value. This format is accepted by native
Map
object and also can be passed inNode
constructor.Returns
IterableIterator<tuple>
-
getFirstPosition() → null | Position
module:engine/model/documentselection~DocumentSelection#getFirstPosition
-
getFirstRange() → null | Range
module:engine/model/documentselection~DocumentSelection#getFirstRange
-
getLastPosition() → null | Position
module:engine/model/documentselection~DocumentSelection#getLastPosition
-
getLastRange() → null | Range
module:engine/model/documentselection~DocumentSelection#getLastRange
-
getRanges() → IterableIterator<Range>
module:engine/model/documentselection~DocumentSelection#getRanges
-
getSelectedBlocks() → IterableIterator<Element>
module:engine/model/documentselection~DocumentSelection#getSelectedBlocks
Gets elements of type "block" touched by the selection.
This method's result can be used for example to apply block styling to all blocks covered by this selection.
Note:
getSelectedBlocks()
returns blocks that are nested in other non-block elements but will not return blocks nested in other blocks.In this case the function will return exactly all 3 paragraphs (note:
<blockQuote>
is not a block itself):<paragraph>[a</paragraph> <blockQuote> <paragraph>b</paragraph> </blockQuote> <paragraph>c]d</paragraph>
In this case the paragraph will also be returned, despite the collapsed selection:
<paragraph>[]a</paragraph>
In such a scenario, however, only blocks A, B & E will be returned as blocks C & D are nested in block B:
[<blockA></blockA> <blockB> <blockC></blockC> <blockD></blockD> </blockB> <blockE></blockE>]
If the selection is inside a block all the inner blocks (A & B) are returned:
<block> <blockA>[a</blockA> <blockB>b]</blockB> </block>
Special case: If a selection ends at the beginning of a block, that block is not returned as from user perspective this block wasn't selected. See #984 for more details.
<paragraph>[a</paragraph> <paragraph>b</paragraph> <paragraph>]c</paragraph> // this block will not be returned
Returns
IterableIterator<Element>
-
getSelectedElement() → null | Element
module:engine/model/documentselection~DocumentSelection#getSelectedElement
-
hasAttribute( key ) → boolean
module:engine/model/documentselection~DocumentSelection#hasAttribute
Checks if the selection has an attribute for given key.
Parameters
key : string
Key of attribute to check.
Returns
boolean
true
if attribute with given key is set on selection,false
otherwise.
-
inherited
is( type ) → this is Element | RootElement
module:engine/model/documentselection~DocumentSelection#is:ELEMENT
Checks whether the object is of type
Element
or its subclass.element.is( 'element' ); // -> true element.is( 'node' ); // -> true element.is( 'model:element' ); // -> true element.is( 'model:node' ); // -> true element.is( 'view:element' ); // -> false element.is( 'documentSelection' ); // -> false
Assuming that the object being checked is an element, you can also check its name:
element.is( 'element', 'imageBlock' ); // -> true if this is an <imageBlock> element text.is( 'element', 'imageBlock' ); -> false
Parameters
type : 'element' | 'model:element'
Returns
this is Element | RootElement
-
Checks whether the object is of type
Text
.text.is( '$text' ); // -> true text.is( 'node' ); // -> true text.is( 'model:$text' ); // -> true text.is( 'model:node' ); // -> true text.is( 'view:$text' ); // -> false text.is( 'documentSelection' ); // -> false
Note: Until version 20.0.0 this method wasn't accepting
'$text'
type. The legacy'text'
type is still accepted for backward compatibility.Parameters
type : '$text' | 'model:$text'
Returns
this is Text
-
inherited
is( type ) → this is RootElement
module:engine/model/documentselection~DocumentSelection#is:ROOT_ELEMENT
Checks whether the object is of type
RootElement
.rootElement.is( 'rootElement' ); // -> true rootElement.is( 'element' ); // -> true rootElement.is( 'node' ); // -> true rootElement.is( 'model:rootElement' ); // -> true rootElement.is( 'model:element' ); // -> true rootElement.is( 'model:node' ); // -> true rootElement.is( 'view:element' ); // -> false rootElement.is( 'documentFragment' ); // -> false
Assuming that the object being checked is an element, you can also check its name:
rootElement.is( 'rootElement', '$root' ); // -> same as above
Parameters
type : 'rootElement' | 'model:rootElement'
Returns
this is RootElement
-
inherited
is( type ) → this is LiveRange
module:engine/model/documentselection~DocumentSelection#is:LIVE_RANGE
Checks whether the object is of type
LiveRange
.liveRange.is( 'range' ); // -> true liveRange.is( 'model:range' ); // -> true liveRange.is( 'liveRange' ); // -> true liveRange.is( 'model:liveRange' ); // -> true liveRange.is( 'view:range' ); // -> false liveRange.is( 'documentSelection' ); // -> false
Parameters
type : 'liveRange' | 'model:liveRange'
Returns
this is LiveRange
-
inherited
is( type ) → this is Range | LiveRange
module:engine/model/documentselection~DocumentSelection#is:RANGE
Checks whether the object is of type
Range
or its subclass.range.is( 'range' ); // -> true range.is( 'model:range' ); // -> true range.is( 'view:range' ); // -> false range.is( 'documentSelection' ); // -> false
Parameters
type : 'range' | 'model:range'
Returns
-
inherited
is( type ) → this is LivePosition
module:engine/model/documentselection~DocumentSelection#is:LIVE_POSITION
Checks whether the object is of type
LivePosition
.livePosition.is( 'position' ); // -> true livePosition.is( 'model:position' ); // -> true livePosition.is( 'liveposition' ); // -> true livePosition.is( 'model:livePosition' ); // -> true livePosition.is( 'view:position' ); // -> false livePosition.is( 'documentSelection' ); // -> false
Parameters
type : 'livePosition' | 'model:livePosition'
Returns
this is LivePosition
-
inherited
is( type ) → this is Position | LivePosition
module:engine/model/documentselection~DocumentSelection#is:POSITION
Checks whether the object is of type
Position
or its subclass.position.is( 'position' ); // -> true position.is( 'model:position' ); // -> true position.is( 'view:position' ); // -> false position.is( 'documentSelection' ); // -> false
Parameters
type : 'position' | 'model:position'
Returns
this is Position | LivePosition
-
inherited
is( type ) → this is Selection | DocumentSelection
module:engine/model/documentselection~DocumentSelection#is:SELECTION
Checks whether the object is of type
Selection
orDocumentSelection
.selection.is( 'selection' ); // -> true selection.is( 'model:selection' ); // -> true selection.is( 'view:selection' ); // -> false selection.is( 'range' ); // -> false
Parameters
type : 'selection' | 'model:selection'
Returns
this is Selection | DocumentSelection
-
inherited
is( type, name ) → boolean
module:engine/model/documentselection~DocumentSelection#is:ELEMENT_NAME
Checks whether the object is of type
Element
or its subclass and has the specifiedname
.element.is( 'element', 'imageBlock' ); // -> true if this is an <imageBlock> element text.is( 'element', 'imageBlock' ); -> false
Type parameters
N : extends string
Parameters
type : 'element' | 'model:element'
name : N
Returns
boolean
-
inherited
is( type, name ) → boolean
module:engine/model/documentselection~DocumentSelection#is:ROOT_ELEMENT_NAME
Checks whether the object is of type
RootElement
and has the specifiedname
.rootElement.is( 'rootElement', '$root' );
Type parameters
N : extends string
Parameters
type : 'rootElement' | 'model:rootElement'
name : N
Returns
boolean
-
inherited
is( type ) → this is TextProxy
module:engine/model/documentselection~DocumentSelection#is:TEXT_PROXY
Checks whether the object is of type
TextProxy
.textProxy.is( '$textProxy' ); // -> true textProxy.is( 'model:$textProxy' ); // -> true textProxy.is( 'view:$textProxy' ); // -> false textProxy.is( 'range' ); // -> false
Note: Until version 20.0.0 this method wasn't accepting
'$textProxy'
type. The legacy'textProxt'
type is still accepted for backward compatibility.Parameters
type : '$textProxy' | 'model:$textProxy'
Returns
this is TextProxy
-
inherited
is( type ) → this is Marker
module:engine/model/documentselection~DocumentSelection#is:MARKER
-
inherited
is( type ) → this is DocumentSelection
module:engine/model/documentselection~DocumentSelection#is:DOCUMENT_SELECTION
Checks whether the object is of type
DocumentSelection
.selection.is( 'selection' ); // -> true selection.is( 'documentSelection' ); // -> true selection.is( 'model:selection' ); // -> true selection.is( 'model:documentSelection' ); // -> true selection.is( 'view:selection' ); // -> false selection.is( 'element' ); // -> false selection.is( 'node' ); // -> false
Parameters
type : 'documentSelection' | 'model:documentSelection'
Returns
this is DocumentSelection
-
inherited
is( type ) → this is DocumentFragment
module:engine/model/documentselection~DocumentSelection#is:DOCUMENT_FRAGMENT
Checks whether the object is of type
DocumentFragment
.docFrag.is( 'documentFragment' ); // -> true docFrag.is( 'model:documentFragment' ); // -> true docFrag.is( 'view:documentFragment' ); // -> false docFrag.is( 'element' ); // -> false docFrag.is( 'node' ); // -> false
Parameters
type : 'documentFragment' | 'model:documentFragment'
Returns
this is DocumentFragment
-
inherited
is( type ) → this is Node | Text | Element | RootElement
module:engine/model/documentselection~DocumentSelection#is:NODE
Checks whether the object is of type
Node
or its subclass.This method is useful when processing model objects that are of unknown type. For example, a function may return a
DocumentFragment
or aNode
that can be either a text node or an element. This method can be used to check what kind of object is returned.someObject.is( 'element' ); // -> true if this is an element someObject.is( 'node' ); // -> true if this is a node (a text node or an element) someObject.is( 'documentFragment' ); // -> true if this is a document fragment
Since this method is also available on a range of view objects, you can prefix the type of the object with
model:
orview:
to check, for example, if this is the model's or view's element:modelElement.is( 'model:element' ); // -> true modelElement.is( 'view:element' ); // -> false
By using this method it is also possible to check a name of an element:
imageElement.is( 'element', 'imageBlock' ); // -> true imageElement.is( 'element', 'imageBlock' ); // -> same as above imageElement.is( 'model:element', 'imageBlock' ); // -> same as above, but more precise
Parameters
type : 'node' | 'model:node'
Returns
this is Node | Text | Element | RootElement
-
inherited
listenTo( emitter, event, callback, [ options ] ) → void
module:engine/model/documentselection~DocumentSelection#listenTo:BASE_EMITTER
Registers a callback function to be executed when an event is fired in a specific (emitter) object.
Events can be grouped in namespaces using
:
. When namespaced event is fired, it additionally fires all callbacks for that namespace.// myEmitter.on( ... ) is a shorthand for myEmitter.listenTo( myEmitter, ... ). myEmitter.on( 'myGroup', genericCallback ); myEmitter.on( 'myGroup:myEvent', specificCallback ); // genericCallback is fired. myEmitter.fire( 'myGroup' ); // both genericCallback and specificCallback are fired. myEmitter.fire( 'myGroup:myEvent' ); // genericCallback is fired even though there are no callbacks for "foo". myEmitter.fire( 'myGroup:foo' );
An event callback can stop the event and set the return value of the
fire
method.Type parameters
Parameters
emitter : Emitter
The object that fires the event.
event : TEvent[ 'name' ]
The name of the event.
callback : GetCallback<TEvent>
The function to be called on event.
[ options ] : GetCallbackOptions<TEvent>
Additional options.
Returns
void
-
observeMarkers( prefixOrName ) → void
module:engine/model/documentselection~DocumentSelection#observeMarkers
Registers a marker group prefix or a marker name to be collected in the selection markers collection.
See also
MarkerCollection#getMarkersGroup()
.Parameters
prefixOrName : string
The marker group prefix or marker name.
Returns
void
-
Stops executing the callback on the given event. Shorthand for
this.stopListening( this, event, callback )
.Parameters
event : string
The name of the event.
callback : Function
The function to stop being called.
Returns
void
-
inherited
on( event, callback, [ options ] ) → void
module:engine/model/documentselection~DocumentSelection#on
Registers a callback function to be executed when an event is fired.
Shorthand for
this.listenTo( this, event, callback, options )
(it makes the emitter listen on itself).Type parameters
Parameters
event : TEvent[ 'name' ]
The name of the event.
callback : GetCallback<TEvent>
The function to be called on event.
[ options ] : GetCallbackOptions<TEvent>
Additional options.
Returns
void
-
inherited
once( event, callback, [ options ] ) → void
module:engine/model/documentselection~DocumentSelection#once
Registers a callback function to be executed on the next time the event is fired only. This is similar to calling
on
followed byoff
in the callback.Type parameters
Parameters
event : TEvent[ 'name' ]
The name of the event.
callback : GetCallback<TEvent>
The function to be called on event.
[ options ] : GetCallbackOptions<TEvent>
Additional options.
Returns
void
-
refresh() → void
module:engine/model/documentselection~DocumentSelection#refresh
Refreshes selection attributes and markers according to the current position in the model.
Returns
void
-
inherited
stopDelegating( [ event ], [ emitter ] ) → void
module:engine/model/documentselection~DocumentSelection#stopDelegating
Stops delegating events. It can be used at different levels:
- To stop delegating all events.
- To stop delegating a specific event to all emitters.
- To stop delegating a specific event to a specific emitter.
Parameters
[ event ] : string
The name of the event to stop delegating. If omitted, stops it all delegations.
[ emitter ] : Emitter
(requires
event
) The object to stop delegating a particular event to. If omitted, stops delegation ofevent
to all emitters.
Returns
void
-
inherited
stopListening( [ emitter ], [ event ], [ callback ] ) → void
module:engine/model/documentselection~DocumentSelection#stopListening:BASE_STOP
Stops listening for events. It can be used at different levels:
- To stop listening to a specific callback.
- To stop listening to a specific event.
- To stop listening to all events fired by a specific object.
- To stop listening to all events fired by all objects.
Parameters
[ emitter ] : Emitter
The object to stop listening to. If omitted, stops it for all objects.
[ event ] : string
(Requires the
emitter
) The name of the event to stop listening to. If omitted, stops it for all events fromemitter
.[ callback ] : Function
(Requires the
event
) The function to be removed from the call list for the givenevent
.
Returns
void
-
internal
_getStoredAttributes() → Iterable<tuple>
module:engine/model/documentselection~DocumentSelection#_getStoredAttributes
Returns an iterable that iterates through all selection attributes stored in current selection's parent.
Returns
Iterable<tuple>
-
internal
_overrideGravity() → string
module:engine/model/documentselection~DocumentSelection#_overrideGravity
Temporarily changes the gravity of the selection from the left to the right.
The gravity defines from which direction the selection inherits its attributes. If it's the default left gravity, the selection (after being moved by the the user) inherits attributes from its left hand side. This method allows to temporarily override this behavior by forcing the gravity to the right.
It returns an unique identifier which is required to restore the gravity. It guarantees the symmetry of the process.
Returns
string
The unique id which allows restoring the gravity.
Related:
-
internal
_removeAttribute( key ) → void
module:engine/model/documentselection~DocumentSelection#_removeAttribute
Removes an attribute with given key from the selection. If the given attribute was set on the selection, fires the event-change:range event with removed attribute key. Should be used only within the
removeSelectionAttribute
method.Parameters
key : string
Key of the attribute to remove.
Returns
void
Related:
-
internal
_restoreGravity( uid ) → void
module:engine/model/documentselection~DocumentSelection#_restoreGravity
Restores the overridden gravity.
Restoring the gravity is only possible using the unique identifier returned by
_overrideGravity
. Note that the gravity remains overridden as long as won't be restored the same number of times it was overridden.Parameters
uid : string
The unique id returned by
_overrideGravity
.
Returns
void
Related:
-
internal
_setAttribute( key, value ) → void
module:engine/model/documentselection~DocumentSelection#_setAttribute
Sets attribute on the selection. If attribute with the same key already is set, it's value is overwritten. Should be used only within the
setSelectionAttribute
method.Parameters
key : string
Key of the attribute to set.
value : unknown
Attribute value.
Returns
void
Related:
-
internal
_setFocus( itemOrPosition, [ offset ] ) → void
module:engine/model/documentselection~DocumentSelection#_setFocus
Moves
focus
to the specified location. Should be used only within thesetSelectionFocus
method.The location can be specified in the same form as writer.createPositionAt() parameters.
Parameters
itemOrPosition : Position | Item
[ offset ] : PositionOffset
Offset or one of the flags. Used only when first parameter is a model item.
Returns
void
Related:
-
Sets this selection's ranges and direction to the specified location based on the given selectable. Should be used only within the
setSelection
method.Parameters
args : tuple
Returns
void
Related:
Static methods
-
internal static
_getStoreAttributeKey( key ) → string
module:engine/model/documentselection~DocumentSelection._getStoreAttributeKey
Generates and returns an attribute key for selection attributes store, basing on original attribute key.
Parameters
key : string
Attribute key to convert.
Returns
string
Converted attribute key, applicable for selection store.
-
internal static
_isStoreAttributeKey( key ) → boolean
module:engine/model/documentselection~DocumentSelection._isStoreAttributeKey
Checks whether the given attribute key is an attribute stored on an element.
Parameters
key : string
Returns
boolean
Events
-
change( eventInfo, directChange = { [directChange.attributeKeys], directChange.directChange, [directChange.oldMarkers] } )
module:engine/model/documentselection~DocumentSelection#event:change
Fired when selection range(s), attribute(s) or marker(s) changed.
Parameters
eventInfo : EventInfo
An object containing information about the fired event.
directChange : object
This is always set to
false
in case ofchange:marker
event as there is no possibility to change markers directly throughDocumentSelection
API. See also event-change:range and event-change:attribute.Properties[ directChange.attributeKeys ] : Array<string>
directChange.directChange : boolean
[ directChange.oldMarkers ] : Array<Marker>
-
change:attribute( eventInfo, directChange = { directChange.attributeKeys, directChange.directChange } )
module:engine/model/documentselection~DocumentSelection#event:change:attribute
Fired when selection attribute changed.
Parameters
eventInfo : EventInfo
An object containing information about the fired event.
directChange : object
In case of
Selection
class it is always set totrue
which indicates that the selection change was caused by a direct use of selection's API. TheDocumentSelection
, however, may change because its attributes were directly changed through the writer or because its position was changed in the model and its attributes were refreshed (which means an indirect change). The indirect change does not occur in case of normal (detached) selections because they are "static" (as "not live") which mean that they are not updated once the document changes.PropertiesdirectChange.attributeKeys : Array<string>
directChange.directChange : boolean
-
change:marker( eventInfo, directChange = { directChange.directChange, directChange.oldMarkers } )
module:engine/model/documentselection~DocumentSelection#event:change:marker
Fired when selection marker(s) changed.
Parameters
eventInfo : EventInfo
An object containing information about the fired event.
directChange : object
This is always set to
false
in case ofchange:marker
event as there is no possibility to change markers directly throughDocumentSelection
API. See also event-change:range and event-change:attribute.PropertiesdirectChange.directChange : boolean
directChange.oldMarkers : Array<Marker>
-
change:range( eventInfo, directChange = { directChange.directChange } )
module:engine/model/documentselection~DocumentSelection#event:change:range
Fired when selection range(s) changed.
Parameters
eventInfo : EventInfo
An object containing information about the fired event.
directChange : object
In case of
Selection
class it is always set totrue
which indicates that the selection change was caused by a direct use of selection's API. TheDocumentSelection
, however, may change because its position was directly changed through the writer or because its position was changed because the structure of the model has been changed (which means an indirect change). The indirect change does not occur in case of normal (detached) selections because they are "static" (as "not live") which mean that they are not updated once the document changes.PropertiesdirectChange.directChange : boolean
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.