Ensure Position's and Range's immutability #4406
Labels
package:engine
resolution:expired
This issue was closed due to lack of feedback.
status:stale
type:improvement
This issue reports a possible enhancement of an existing feature.
Strongly related to https://github.com/ckeditor/ckeditor5-engine/issues/897
Currently,
Position#offset
has a setter and the property itself is not defined as@readonly
. What's worse, we use that setter in some places.As we understood when working on https://github.com/ckeditor/ckeditor5-engine/issues/897 we need mutable positions and perhaps ranges too, but they should be used in a controlled environment only (inside computational heavy algorithms). Public API should not use them. And publicly,
Position
andRange
should be immutable.The text was updated successfully, but these errors were encountered: