@simevidas you could add a reference to infra.spec.whatwg.org/#string- that specifies that the length of a string is the number of UTF-16 code units.

(Alas, I personally would would prefer that graphemes would be the length – disappearing children or others tend to surprise users)