styleByPath

fun styleByPath(path: List<Int>, attributes: Map<String, String>)

Sets the attributes to the element at the given path.

Throws

with ErrInvalidArgument if path resolves to an index inside a UTF-16 surrogate pair.


fun styleByPath(fromPath: List<Int>, toPath: List<Int>, attributes: Map<String, String>)

Sets the attributes to the elements in the path range between fromPath and toPath.

Throws

if fromPath is ordered after toPath (JS SDK throws YorkieError for the same backwards range instead).

with ErrInvalidArgument if fromPath or toPath resolves to an index inside a UTF-16 surrogate pair.